...

View Full Version : Simple Problem using element.hide



jshphoto
02-01-2007, 11:42 PM
I'm using a ajax - scriptaculous effect to hide and reveal elements on the page. The reveal effect I am using is 'slide' and it works just fine. I'm using 4 instances of the effect and when each instance is toggled, I want the other 3 to be hidden. For some reason it is not working properly and the all four elements can be revealed at the same time.

I would be most greatful to anyone who would be willing to take a look at the page at http://jshphoto.net/endall/beta.html . I have the javascripts linked from there. I do not think that it should be too terribly difficult to solve this problem so give it a shot.

Thanks,
Stephen

brandonH
02-02-2007, 12:00 AM
to hide:

element.style.visibility='hidden';
element.style.display='none';


to make visible again use:

element.style.visibility='visible';
element.style.display='block';

jshphoto
02-02-2007, 12:13 AM
Well, the reveal effect works just fine. The effect that does not work is the element.hide('id') . I'm trying to make it so that when one is revealed, the others are hidden.

ex.

<li><a href="#" onclick="Effect.toggle('contact','slide'); Element.hide('bio'); Element.hide('galleries'); Element.hide('links')">CONTACT</a></li>

<li><a href="#" onclick="Effect.toggle('galleries','slide'); Element.hide('bio'); Element.hide('contact'); Element.hide('links')">IMAGE GALLERIES</a></li>



please take a look at the example page at because it still does not work, and thanks for the reply. http://jshphoto.net/endall/beta.html .

Stephen



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum