On Jun 11, 11:38 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> Hi
>
> No, I mean that if you call bind() on the document, you only add the
> event handler to the document. Not to every element in it.
> The reason it reacts to a click everywhere is "event bubbling" (google
> it).
>
> I said that you should bind to the document, and then, inside the
> function, figure out whether the clicked element is a textarea and if
> it's not... then do w/e you need to do.
>
> $(document).bind('click', function(e){
>    if( e.target.nodeName == 'TEXTAREA' )
>          return;
>    // do stuff
>
> });
>
> Cheers

Thanks Ariel.  I have finally got over one of my major hurdles with
your help.

Nandu

Reply via email to