Basically I have a popup and want to hide it when it is clicked anywhere outside, but one element (which is another popup, let say div#AnotherPopup). Then I click on #AnotherPopup, it should not hide the original one.. It does now, because I have this:
$(document).bind('click', methods.hide);
How to bind it to document, except #AnotherPopup ? 🙂
You can’t really but you can check inside
methods.hideif the target element is#AnotherPopupand immediately return out of the function before doing anything.