Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Problem using element.hide

    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

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    to hide:

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


    to make visible again use:

    element.style.visibility='visible';
    element.style.display='block';
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #3
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Code:
    <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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •