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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    jQuery Unwanted yoyo effect on slideDown/slideUp

    I am trying to make a menu that has a rollover which displays an image on top and is revaled sliding down from top to bottom. I want the rollover image to dissapear when rolled off the button by sliding back up.

    This is where I have got so far:
    http://exsiteinteractive.ca/yoyo/yoyo.html

    Problem here is that when I rollover i am getting a yoyo effect but i want the hover image to stay down until rolled off the button.

    Based my code around this:
    http://www.webdesignerwall.com/demo/...ed-hover1.html

  • #2
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    It's to do with your selectors, try this.
    Code:
    $(document).ready(function(){
      $('.menu li').hover(function(){
        $(this).children(':last').slideDown('slow');
      }, function(){
        $(this).children(':last').slideUp('slow');
      });
    });


  •  

    Posting Permissions

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