473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

expand / collapse of divs ?

Mel
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

Mar 13 '06 #1
4 6566
Mel wrote:
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


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 = ""
Mar 13 '06 #2
Mel
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

Mar 13 '06 #3
Mel wrote:
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

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.
Mar 13 '06 #4
Mel wrote:
i am displaying the following (+ & - signs are images):


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

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

Mar 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Hurrell | last post by:
Hi, I'm using the following javascript function to expand and collapse portions of text in a web page (targeted at IE5.5 and above): function doExpand(paraNum,arrowNum) { if...
3
by: ireneatngs | last post by:
Hi, I have example html below which contains a couple of hidden divs. However, some of the table borders within these hidden divs are actually displayed when they should not be. In my...
1
by: Randy Starkey | last post by:
Hi, Is there a way to expand and collapse all if I have multiple implementations of this script on a single page? The script works well individually. Thanks! --Randy Starkey ---
4
by: Gönen EREN | last post by:
how can i collapse or expand a node of treeview control programmaticly? thanks.
1
by: Mel | last post by:
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
0
by: Shadow Lynx | last post by:
When using ASP.NET 2.0's built-in TreeView on a page with <BASE target = "AnythingBut_Self"></BASE> in the HEAD, the expand/collapse buttons fail to function. The reason for this is that the...
2
by: sam | last post by:
Hi all, I have a series of divs in 2 blocks say BLOCK1 and BLOCK2 and I want to use one click to expand/collapse all those in each block. But the code I came up with exapands all the divs in the...
0
by: jim | last post by:
Hi, I have a TreeView control that sits on the MasterPage. All of my other webpages inherit from that Master Page. The Treeview receives it's data using an XMLDataSource that has it's DataFile...
4
by: Rabel | last post by:
I am not very good at javascript I mostly am a flash developer but I am trying to apply one of our old expanding menus to work for a new site but it doesn't collapse the way I need it to right now...
0
by: pbd22 | last post by:
Hi. I have two divs inside a containing div <div id=container> <div id=top> </div> <div id=bottom> </div> </div>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.