Created
October 27, 2012 20:23
-
-
Save jacekd/3966005 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