$('body').not('#someid').unbind('click').click(function() { /* code */ });
with this u remove the #someid from all body elements so this unbind not work i can test $('body').children().is('#someid').unbind('click').click(function() { /* code */ }); if the unbind().click() sequence works, u can test $('body').children().is('#someid').unbind('click'); $('body').children().is('#someid').click(function() { /* code */ }); On 5/20/07, MikeR <[EMAIL PROTECTED]> wrote:
Just a quick question =). I want to bind an event handler to "body" so that whenever someone clicks anywhere on the body, a DIV disappears. However, there is a specific graphic (that has an id) that I need to be ignored in that click handler. I haven't been able to come up with an elegant solution and was hoping someone here may have some advice. I've tried something along the lines of: $ ('body').not('#someid').unbind('click').click(function() { /* code */ }); But it does not work. Any thoughts?
-- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com