Skip to content

Instantly share code, notes, and snippets.

@abrjagad
Created February 11, 2014 07:57
Show Gist options
  • 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