PDA

View Full Version : jQuery Unwanted yoyo effect on slideDown/slideUp


ryansax
04-14-2009, 10:49 PM
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/jquery/animated-hover1.html

Iszak
04-15-2009, 05:32 AM
It's to do with your selectors, try this.

$(document).ready(function(){
$('.menu li').hover(function(){
$(this).children(':last').slideDown('slow');
}, function(){
$(this).children(':last').slideUp('slow');
});
});