Selectors in Live Method

Selectors in Live Method


Since we're using Event Delegation on the document object, I'm curious
why the selector even needs to be executed prior to calling the live
method. Why not make it a jQuery function instead?
$.live = function(selector, type, fn)
{
var r = $([]);
r.selector = selector;
if(type && fn) {
r.live(type, fn);
}
return r;
};
There might be some confusion with this approach, since the jQuery
object being returned does not actually contain any nodes, but it's
something to think about.
Thanks,
Zach Leatherman
http://www.zachleat.com/