my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Expand / Collapse of div elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Expand / Collapse of div elements" Watch "Expand / Collapse of div elements" New topic
Author

Expand / Collapse of div elements

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9381
    
    2

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,



SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6


Eric
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9381
    
    2

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
It is not supposed to be e, it should be the button you clicked on. so you need the button's object there.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Expand / Collapse of div elements