On Wed, Nov 18, 2009 at 8:22 PM, xwisdom <xwis...@gmail.com> wrote: > Thanks for the feedback. > >> $(context).delegate('li:even, li:odd', 'click', callback) >> $(context).delegate('li' 'click.namespace', callback)
Actually, the more I think about it, the more I think that this is still more readable: $(context).delegate('click', 'li', callback [, data]) because it can be comfortably read as "In context, delegate click events on "LI" elements to callback [using data]. That readability is extremely beneficial. And I don't think there is a need to skip the selector. What advantage does this: $(context).delegate('click', callback) have over these: $(context).click(callback) $(context).bind('click', callback) ? If there is none, perhaps there is no reason to allow it. > I've also being thinking about using a "|" instead of a ":" > > $(context).delegate('li |click', data, callback) That's certainly preferable to ":", but I still like these alternate syntaxes better. > or just use a space: > > $(context).delegate('li click', data, callback) That seems problematic. What happens in an XML document that includes a <click> element inside an "li" one? It starts to get hairy. In any case, what do you think of $(context).delegate(event, selector, callback [, data]) ? -- Scott -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=.