ma05dw
Last Updated: February 25, 2016
·
301
· dustintheweb

If Any Click But This... Do That!

(function($) {
    $(document).mouseup(function(e) {
       if($(e.target).closest($someSection).length) {
          return false;
       }
       if(!$(e.target).closest($someSection).length && !$(e.target).is($someSection)) {
          // do something... ex: $someSection.removeClass('open');
       }
    });
})(jQuery);