Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Expand / Collapse of div elements

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have the following javascript function that does the expand / collapse of the div elements.



I would like to add a small image to the expand and collapse feature. Any idea on how to do it?

This is my HTML,

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Eric
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So now my javascript looks like this,



Even after this I'm not able to get the image on my screen? Did I go wrong anywhere?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not supposed to be e, it should be the button you clicked on. so you need the button's object there.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic