This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accordion-Default value

 
Aditi Gandy
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am developing a collapsable and expandable accordion in my page. I have the complete code, but, by default, i want that accodion to be in closed form. can any one please help me? Only when i click on description, it should open up another <div> to show the description.. can anyone tell me how to do it?

First.html


Java Script code


Now comes the .css code


Please help
 
Aditi Gandy
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any one Please help me!

Regards,
Author
 
K West
Ranch Hand
Posts: 58
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aditi,

This should work



 
Brian Legg
Ranch Hand
Posts: 488
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What K West said, and onClick description change the visibility.
 
Aditi Gandy
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian Legg wrote:What K West said, and onClick description change the visibility.


I have tried both the suggessions. If I do display "none", it will not display onClick also....

i tried with changing onClick description, it is also not working.....there should be some simple solution for it.....i am not able to figure it.

please help.

Regards,
 
K West
Ranch Hand
Posts: 58
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to only make the display:none, do nothing else, rest of the functionality and code remains the same.

Just use this, It works for me



All the Best
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic