Skip to content

Instantly share code, notes, and snippets.

@abrjagad
Created February 11, 2014 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrjagad/8930774 to your computer and use it in GitHub Desktop.
Save abrjagad/8930774 to your computer and use it in GitHub Desktop.
Close Mobile Menu on click outside, used when doing responsive page, for small screens
$(".small-menu").click(function (event) {
event.stopPropagation();
$(".fixed-nav-header").fadeToggle();
})
$(document).click(function () {
if ($(".fixed-nav-header").is(":visible")) {
$(".fixed-nav-header").fadeOut();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment