When you bind the document, you just bind the document, not all its elements. So you can't unbind afterwards.
You need to use conditions (.is() to skip clicks on textareas from that handler. if( this.nodeName == 'TEXTAREA' ) // or $(this).is('textarea') return; -- Ariel Flesler http://flesler.blogspot.com On 10 jun, 04:07, nandu <[EMAIL PROTECTED]> wrote: > Dear Folks, > > I have a problem where I bind a click function to the entire document, > but then want to unbind it for a specific element in this case a > textarea, so that, clicks inside the textarea do not trigger the bound > function. > > Could using namespaces solve the problem. Moreover is namespace > functionality available in jQuery 1.2.1 > > I have provided a simplified framework the jQuery code I am using to > to do this below: > > entire_document.bind('click', function(e) > { > jQuery('#textareaid').unbind('click'); //Trying to unbind > click > for a sepcific element > if (condition) > { > // do some stuff > } > else > { > // do some other stuff > } > entire_document.unbind('click'); > });