English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a test drop down page I made, but right now I have to click "hide" to collapse the text. Does anyone know how to collapse and expand using the same link?
Thanks

the page can be seen here
http://www.arst3000.com/dropdown.html

2006-09-18 07:40:34 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

the easiest way is to set a variable (expanded lets say) to true when the menu is expanded and to false when it is closed:




toggleMenu(){
if( expanded ){
expanded = false;
hideMenu();
}
else{
expanded = true;
showMenu();
}
}

2006-09-18 08:53:59 · answer #1 · answered by John J 6 · 0 0

Take a look at this:
http://www.tjkdesign.com/articles/toggle_elements.asp

2006-09-18 08:07:53 · answer #2 · answered by The First 3 · 0 0

i think take a look at
http://www.dynamicdrive.com
the best dhtml website.

2006-09-18 07:45:48 · answer #3 · answered by ibrahim ersoy 2 · 0 1

fedest.com, questions and answers