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
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 wh
On Jun 10, 11:21 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> 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'
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://flesl
4 matches
Mail list logo