I want to hide the div when I click on a document, but I do not want to hide this div when someone clicks on it or clicks on a link or button in it. In addition, I have some links inside this set of divs to prevent the click (return false;) action and send an ajax request.
I tried:
$(document).click(function(e) {
$('#bubble').hide();
});
$('#bubble').click(function(e) {
return false;
});
It works fine, but links and buttons under #bubble do not work.
source
share