fixed menu hoover issue 1036, thanks Paolo
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-27 22:15:52) stable
|
Version 2.0.9 (2012-09-27 22:28:55) stable
|
||||||
|
|||||||
@@ -8,15 +8,20 @@ jQuery(function(){
|
|||||||
if(jQuery(this).find('ul').length)
|
if(jQuery(this).find('ul').length)
|
||||||
jQuery(this).addClass('dropdown-submenu');
|
jQuery(this).addClass('dropdown-submenu');
|
||||||
});
|
});
|
||||||
if(jQuery(document).width()>=980) {
|
function hoverMenu(){
|
||||||
jQuery('ul.nav a.dropdown-toggle').parent().hover(function() {
|
var wid = document.documentElement.clientWidth; //faster than $(window).width() and cross browser
|
||||||
mi = jQuery(this).addClass('open');
|
if (wid>=980){
|
||||||
mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400);
|
jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){
|
||||||
}, function() {
|
mi = jQuery(this).addClass('open');
|
||||||
mi = jQuery(this);
|
mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400);
|
||||||
mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')});
|
}, function(){
|
||||||
});
|
mi = jQuery(this);
|
||||||
|
mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')});
|
||||||
|
});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
hoverMenu(); // first page load
|
||||||
|
jQuery(window).resize(hoverMenu); // on resize event
|
||||||
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
|
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
|
||||||
// make all buttons bootstrap buttons
|
// make all buttons bootstrap buttons
|
||||||
jQuery('button, form input[type="submit"], form input[type="button"]').addClass('btn');
|
jQuery('button, form input[type="submit"], form input[type="button"]').addClass('btn');
|
||||||
|
|||||||
Reference in New Issue
Block a user