Skip to content

Instantly share code, notes, and snippets.

@jlcampana
Created November 27, 2013 10:07
Show Gist options
  • Save jlcampana/7673387 to your computer and use it in GitHub Desktop.
Save jlcampana/7673387 to your computer and use it in GitHub Desktop.
Ocultar div si se pulsó fuera
//Hacemos dismiss si el menú está visible y se pulsó fuera
$(document).mouseup(function (e)
{
var container = null;
if($('#menu_settings').is(":visible"))
{
container = $('#menu_settings');
}
if (container!=null && !container.is(e.target))
{
container.hide();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment