Here is whats happening (Code Block Below):
- I am working on a simple drop-down nav (based on nested Ul’s).
- The Main UL has an ID of #nav.
- The hover-> mouseout function does NOT fire at all (all browsers)
- After the 1st mouseover any subsequent mouseovers do NOT animate (i.e. slideDown) in Chrome 12.0.742.122, Safari (5.05), Opera (11.50), IE (9.0.8). In fact it ONLY seems to work in Firefox (5.0).
- I’ve tested on Windows (7) only. No mac…yet.
- The only way to get the animations to work again is to refresh to the page.
- I’m learning this from a Nettuts tutorial which was posted a little over a year ago, cant believe it’s outdated already.
- FYI: I’m calling jQuery and the script below at the BOTTOM of my html page.
- Another FYI: I’m still rather green, so clarity in response would be very helpful
Any ideas?
Thanks In Advance,
sleeper
var site = function(){
this.navLI = $('#nav > li').children('ul').css('display','none').end();
this.init();
};
site.prototype = {
init: function(){
this.setMenu();
},
// enables the slide down menu and adds support for ie6
setMenu: function(){
this.navLI.hover(function(){
// mouseover
$(this).find('> ul').stop(true, true).slideDown(250);
}, function(){
// mouseout
$(this).find('> ul').stop(true, true).fadeOut(200);
});
}
}
new site();
You didn’t need the
display: nonein your CSS for yourulelements. Check out this updated fiddle and you’ll see the desired effect.