Skip to content

Instantly share code, notes, and snippets.

@Rayjax
Created August 27, 2014 13:07
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 Rayjax/c22481da2751ee653642 to your computer and use it in GitHub Desktop.
Save Rayjax/c22481da2751ee653642 to your computer and use it in GitHub Desktop.
$(document).on("click", function (e)
{
var div = $("tadiv");
if (!div.is(e.target) // ignorer ta div
&& div.has(e.target).length === 0) // ignorer ses contenus
{
alert("click en dehors effectue")
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment