Andy,
That is not entirely true. It only binds the event the first time it finds the element. If you called unbind on a particular element, the event would be unbound. The only time that event would be rebound is if the Live Query was expired (.expire()) and then re-setup (.livequery()). However I wouldn't rely on that functionality simply because that unbinding the event for one element in a collection means that you need to think about constructing a different selector. BTW ... calling .expire() would unbind all the events and ... if you where using a class selector like this:
$('.doSomething').livequery('click', doSomething);
Then you changed one of the elements by removing the class "doSomething", the event would be unbound.
--
Brandon Aaron
<div><span class="gmail_quote">On 8/21/07, <b class="gmail_sendername">Andy Matthews</b> <<a href="mailto:lists@commadelimited.com">
lists@commadelimited.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What happens though if you want to REMOVE the binding from an object. Using
this plugin, it would Rebind it right afterwards.
-----Original Message-----
From: <a href="mailto:jquery-en@googlegroups.com">
jquery-en@googlegroups.com</a> [mailto:<a href="mailto:jquery-en@googlegroups.com">
jquery-en@googlegroups.com</a>] On
Behalf Of Eridius
Sent: Tuesday, August 21, 2007 11:30 AM
To: <a href="mailto:jquery-en@googlegroups.com">
jquery-en@googlegroups.com</a>
Subject: [jQuery] Re: New Plugin: Live Query (previously called Behavior)
This should be intergrated in the core jquery, i think it could replace
.bind since it does the same thing but more without have to change any
parameters, just to to the change c.bind to .livequery.
duma wrote:
>
> Oh, this is DOPE dude!! This is destined to be integrated into
> jQuery; this is a real problem for dynamic web pages right now.
>
> THANKS!!!
> Sean
>
>
> Brandon Aaron wrote:
>>
>> Some of you may be familiar with Behavior. It was a first attempt at
>> implementing a "live DOM" experience. Behavior has been rewritten
>> from the ground up with performance in mind and new features. It is
>> now called Live Query. A couple of new features are that:
>>
>> * Live Queries work with attribute and class selectors
>> * Live Query automatically unbinds events to unmatched elements and
>> when the Live Query is expired
>> * Live Query can fire a second callback for when an element is
>> unmatched and when the Live Query is expired
>>
>> Check out the blog post for more details:
>> <a href="http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/">
http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/</a>>>
>> --
>> Brandon Aaron
>>
>>
>
>
--
View this message in context:
<a href="http://www.nabble.com/New-Plugin%3A-Live-Query-%28previously-called-Behavior">
http://www.nabble.com/New-Plugin%3A-Live-Query-%28previously-called-Behavior</a>%29-tf4296594s15494.html#a12258261
Sent from the JQuery mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.
</blockquote></div>