Skip to content

Instantly share code, notes, and snippets.

@aseredenko
Created December 13, 2015 13:46
Show Gist options
  • Save aseredenko/3f1edeaa295cd387e20c to your computer and use it in GitHub Desktop.
Save aseredenko/3f1edeaa295cd387e20c to your computer and use it in GitHub Desktop.
$(document).click( function (event) {
if ($(event.target).closest(".page-navigation").length
|| $(event.target).closest(".nav-switcher").length) return;
// What to do on click
event.stopPropagation();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment