jQuery slideDown of div overlay on image slideUp immediately

James Callaghan picture James Callaghan · Jul 6, 2011 · Viewed 9.9k times · Source

I'm trying to create an overlay on a image that slides in and out when hovering over the image. Same reason as this question - JQuery Text slideDown / slideUp Overlay on Image Keeps Bouncing?.

I have placed my code in jsFiddle so it is accesible - http://jsfiddle.net/jamescallaghan/hg9r7/

Any help would be much appreciated.

Answer

Anthony Mineo picture Anthony Mineo · Jul 6, 2011

I think the issue you were having was that the hover was based off the image element and not the .slide so when that text panel slid upwards it covered the image and when you moved the mouse it acted as a hover/unhover.

Please take a look at this, i just updated your code a bit. should work with multiple slides :) Hope this helps!

http://jsfiddle.net/NuWna/2/

All the best, Anthony