On 8/24/07, gr00vy0ne <[EMAIL PROTECTED]> wrote: > > > Thanks for the info. Will the window bind work for me? > > My understanding is that with "window bind" a click anywhere > (including the pop-up layer) will make the layer disappear. How would > I exclude my pop-up layer from disappearing?
One option is compare the target property of the click event: $(window).bind('click', function(ev) { if ($(ev.target).is('#myDiv')) //don't close else //close }) of course ev.target could be a child of #myDiv, so in that case you might want to add a parents() check: if ($(ev.target).is('#myDiv') || $(ev.target).parents('#myDiv').length) All untested, but gives you an idea. - Richard