laurnts
2/12/2015 - 2:36 PM

Clicking Outside Elements

Clicking Outside Elements

$(document).on('click', function(event) {
  if (!$(event.target).closest('[selector]').length) {
    [do something]
  }
});

// More Refference
// http://css-tricks.com/dangers-stopping-event-propagation/