Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeffrey Way JeffreyWay

View GitHub Profile
View main.js
(function(){
var menuBar = $(".menu-bar ul");
var menuActive = menuBar.find("li.active");
menuBar.hover(function() {
menuActive.toggleClass("active");
});
})();
View main.js
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll > 50) {
$(".menu-bar").addClass("menu-bar-scroll");
} else {
$(".menu-bar").removeClass("menu-bar-scroll");
}
});
(function(){
View main.js
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll > 50) {
$(".menu-bar").addClass("menu-bar-scroll");
} else {
$(".menu-bar").removeClass("menu-bar-scroll");
}
});
(function(){
You can’t perform that action at this time.