Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 13th, 2006, 04:35 PM
Mel
Guest
 
Posts: n/a
Default expand / collapse of divs ?

i am displaying the following (+ & - signs are images):

+ click on the sign to the left to expand


after user clicks on the + sign


- thanks for clicking
item-1
item-2
item-3


i know its been asked a mil time before, but cal not...


can someone please send me a little example ?


thanks a bunch

  #2  
Old March 13th, 2006, 05:55 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: expand / collapse of divs ?

Mel wrote:[color=blue]
> i am displaying the following (+ & - signs are images):
>
> + click on the sign to the left to expand
>
> after user clicks on the + sign
>
> - thanks for clicking
> item-1
> item-2
> item-3
>
> i know its been asked a mil time before, but cal not...
>
> can someone please send me a little example ?
>
>
> thanks a bunch
>[/color]

To hide an element with id="thing",

document.getElementById("thing").style.display = "none"

To display it (assuming the element that contains it is already displayed):

document.getElementById("thing").style.display = ""
  #3  
Old March 13th, 2006, 09:45 PM
Mel
Guest
 
Posts: n/a
Default Re: expand / collapse of divs ?

how can i change the images from +.gif to -.gif at the same time ?

if its +.gif it should change to -.gif and visa versa

thanks for your help

  #4  
Old March 13th, 2006, 10:25 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: expand / collapse of divs ?

Mel wrote:[color=blue]
> how can i change the images from +.gif to -.gif at the same time ?
>
> if its +.gif it should change to -.gif and visa versa
>[/color]
Assuming you're talking about foreground images, like the little icons
of open and closed folders, that's not at all a stylesheet question.
Best to ask in a scripting newsgroup.
  #5  
Old March 14th, 2006, 12:35 AM
Toby Inkster
Guest
 
Posts: n/a
Default Re: expand / collapse of divs ?

Mel wrote:
[color=blue]
> i am displaying the following (+ & - signs are images):[/color]

http://examples.tobyinkster.co.uk/menu/menu2

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles