Johan
Johan

Reputation: 35223

slideDown() buggy behaviour

Example: http://83.254.82.145:8080/android/

Look at the menu at the bottom of the map. Try moving the cursor in from the bottom. Why does it show instantly? Same result with animate() and slideDown().

$('#map_canvas, #map_menu').hover(function(e){

    $('#map_menu').stop(true, true).slideDown(200, 'easeOutCubic');

}, function(){

    $('#map_menu').stop(true, true).delay(500).slideUp(500, 'easeInCubic');

});

Any help is much appreciated!

Upvotes: 0

Views: 281

Answers (2)

John Koerner
John Koerner

Reputation: 38087

I beleive your problem lies in this function:

$('#map_canvas, #map_menu').hover( ...

You are calling stop on the animation, so it is firing because you are hovering on the map_canvas, then immediately it is calling the hover on the map_menu because it is sliding up.

Upvotes: 1

AlexC
AlexC

Reputation: 9661

try this:

 $('#mapbackground').hover(function(e){

    $('#map_menu').stop(true, true).slideDown(200, 'easeOutCubic');

  }, function(){

    $('#map_menu').stop(true, true).delay(500).slideUp(500, 'easeInCubic');

 });

Upvotes: 1

Related Questions