|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a list of links.
Each link corresponds with a hidden Div layer. Clicking the link shows the corresponding div layer and hides the rest. It works fine in IE, but Netscape can't handle it. I assume it is because I call the same function multiple times in one click. My question: How could I make it so that clicking the link would call on one function that would show the corresponding div and hide the rest? Is there an easier way to do this than to rewrite the function for each layer? Open to suggestions. Thanks. |
|
#2
|
|||
|
|||
|
http://www.dansteinman.com/dynduo/en/showhide.html would be helpful, as would you actually posting your code. To hide all layers except one I would do something like:
function swapEm(layer){ layers = new Array("layer1","layer2","anotherlayer","yetanotherlayer"); for(var count = 0; count < layers.length; count++) if (layer != layers[count]) hide(layers[count]); show(layer); } |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Show/Hide DIV in Netscape |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|