jQuery(function($){
$(document).mouseup(function (e){ // событие клика по веб-документу
var div = $("#popup"); // тут указываем ID элемента
if (!div.is(e.target) // если клик был не по нашему блоку
&& div.has(e.target).length === 0) { // и не по его дочерним элементам
div.hide(); // скрываем его
}
});
});
Last active
June 18, 2016 07:01
-
-
Save kodired/e9c8f9057f2797a810df to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment