@Zach - Chaining is very powerful, I like the existing functionality
as is. There are performance issues like you mention, but I haven't
run into a selector on a page that has caused me difficulty yet.
*fingers crossed*. If I did, I would either just roll my own by
putting the click event on the document and testing for a match to a
selector or create a plugin doing what you suggest. Having both in
the core might just create confusion,
$.live(selector, 'click', function () {
});
vs.
$(selector).live('click', function () {
});
And the latter is more 'jQuery-ish', at least in my mind.
On May 12, 9:49 pm, Jed Schmidt <[email protected]> wrote:
> I'm not convinced you're sacrificing that much performance. One of the
> great things about .live() is that it can be called before the DOM is
> even ready. The lack of nodes to search means that selection should
> return almost immediately.
>
> Jed Schmidt
>
> On May 12, 9:31 am, Zach Leatherman <[email protected]> wrote:
>
> > Sure, but you're sacrificing quite a bit in performance to get
> > chaining.
>
> > I think it would be helpful to have an alternative option, so that
> > devs are aware of the tradeoff (I'm not asking to change $.fn.live),
> > and my suggestion was to use $.live.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---