Tuesday, 3 September 2013

if statement combined with jQuery .hover

if statement combined with jQuery .hover

I am working with bootstrap and would like to make the drop down menu fade
in when in full screen, however when the window size is smaller this dose
not look good so I want to turn it off and rely on the basic bootstrap.
Here is my code. I cant seem to get the if statement to work.
if ($(window).width() > 766){
$('.navbar .dropdown').hover(function() {
$(this).find('.dropdown-menu').first().stop(true, true).fadeIn(500)},
function() {
$(this).find('.dropdown-menu').first().stop(true, true).fadeOut(500)
});
};

No comments:

Post a Comment