Skip to content

Instantly share code, notes, and snippets.

@dpmango
Last active February 24, 2017 13:06
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 dpmango/99e491b02b2fa7fb59a0ab387d862b43 to your computer and use it in GitHub Desktop.
Save dpmango/99e491b02b2fa7fb59a0ab387d862b43 to your computer and use it in GitHub Desktop.
$(document).mouseup(function (e) {
var container = new Array();
container.push($('.mobile-navi'));
$.each(container, function(key, value) {
if (!$(value).is(e.target) && $(value).has(e.target).length === 0) {
$(value).removeClass('is-active');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment