Created
January 13, 2021 08:56
-
-
Save Ikxyz/cc5491b1d1e4b2ebaea173ec8ba269af to your computer and use it in GitHub Desktop.
This file contains 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
<script lang="javascript"> | |
$(function(){ | |
var navBtn = $(".nav-btn"); | |
var mobileNav = $(".mobile-nav"); | |
var nav = $("#nav"); | |
navBtn.on("click", function(){ | |
$(this).toggleClass('active'); | |
nav.toggleClass('active'); | |
mobileNav.slideToggle(300,function(){ | |
$(this).css('overflow-y',"auto"); | |
}); | |
$('body').toggleClass('mobile'); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment