Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Expand/Collapse a div
2 Posts
Expand/Collapse a div

Hy Danish Are u trying to do similar "http://jquery.bassistance.de/treeview/demo/" If no , still issue let me know what is your js library , paste your js code and also let me know your reference site , if any

I am completely new to ruby and rails, so please excuse the ignorance. Here's what I'm trying to do:

Search a database and generate a list of builds in a table. Each build has a + next to it, which when clicked, does the following: 1) open a div 2) run a partial that goes back to the database and retrieves more information about that build (i.e. test results, etc). 3) change the + to a - 4) close all other open divs.

I'm able to do 1-3, but can't get the - to collapse the current div, or get the + to close other divs.

I'm sure there's something out there that does this, but nothing I've found on the web actually works to collapse the div. Any guidance will be appreciated.

2 Posts
Login to add your message