-
-
Save espositodaniele/3c8b5ecfaf615a6eb36b9e8c7495df52 to your computer and use it in GitHub Desktop.
*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).scroll(function() { | |
var scroll = $(window).scrollTop(); | |
if (scroll > 50) { | |
$(".menu-bar").addClass("menu-bar-scroll"); | |
} else { | |
$(".menu-bar").removeClass("menu-bar-scroll"); | |
} | |
}); | |
(function(){ | |
var menu_bar = $(".menu-bar ul"); | |
var menu_active = menu_bar.find("li.active"); | |
$(".menu-bar ul").hover( | |
function(){ | |
menu_active.removeClass("active"); | |
}, | |
function(){ | |
menu_active.addClass("active"); | |
} | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment