On Tue, Nov 17, 2009 at 10:06 PM, xwisdom <[email protected]> wrote:
> I've put together a little plugin that's based on Zach's $.live().
> [ ... ]
> Check out the source code here:
> http://raxanpdi.com/blog-jquery-event-delegate.html
I think this is worth doing, but I'm trying to understand the
advantage of your syntax over what seems to me a simpler one:
$(context).delegate('li:even, li:odd', 'click', callback)
$(context).delegate('li' 'click.namespace', callback)
and without a selector,
$(context).delegate('click', callback)
I think that this API is enough cleaner that it's worth the slightly
more complicated code to check whether the second parameter is a
function and process accordingly.
The reuse of the ":" bothers me here. I would object less if you
used a separator not allowed in a selector, but I don't see a real
reason to merge the event name with the selector at all.
-- Scott
--
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=.