I would just check the event.target to see if it originated from the image.
$('body').bind('click', function() { if ( $(event.target).is('#someId') ) return; // short-circuit // continue on to hide div }); -- Brandon Aaron 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?