I tried your script and it did as you described. I tried to remove children.is (": hidden") from your script, but the problem still occurred.
When I rewrote it, the script div will never remain visible. So it seems like the problem is using jQuery children instead of searching to access the object:
Still have problems:
jQuery ( function(){ jQuery(".slideDiv").hide(); jQuery(".mainDiv").hover ( function() { $(this).children(".slideDiv").show("slide", { direction: "left" }, 100); },function(){ $(this).children(".slideDiv").hide("slide", { direction: "left" }, 100); } ); } );
Works as intended:
$(document).ready(function(){ $('.slideDiv').hide(); $('.mainDiv').hover( function(){ $(this).find('.slideDiv').show('slide', { direction: 'left' }, 100) }, function(){ $(this).find('.slideDiv').hide('slide', { direction: 'left' }, 100) } ) })
And yes, the hoverIntent plugin is good: P
Mottie
source share