SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("html").click(function(e) {
  2.     //if clicked element is not your element and parents aren't your div
  3.     if (
  4.       e.target.id != "nav-resources-toggle" &&
  5.       $(e.target).parents("#nav-resources-toggle").length == 0
  6.     ) {
  7.       $("#nav-resources-toggle").removeClass("resources-active");
  8.     } else {
  9.       $("#nav-resources-toggle").toggleClass("resources-active");
  10.     }
  11.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top