[jQuery] Re: $.fn.is can't support complex Event Delegation

2008-11-26 Thread Ariel Flesler
jQuery.Intercept does support complex selectors. http://plugins.jquery.com/project/Intercept -- Ariel Flesler http://flesler.blogspot.com On Nov 26, 5:03 am, sliu [EMAIL PROTECTED] wrote: Event Delegation are showing its advantage,especially in large webapp. what's event

[jQuery] Re: $.fn.is can't support complex Event Delegation

2008-11-26 Thread sliu
Thanks for your quick reply. Intercept do work, its source code: $intercept.absolute = /[\s+~]/; if( selector == 'self' target == this || $intercept.absolute.test (selector) ? $(selector).index(target) != -1 : $target.is(selector) )

[jQuery] Re: $.fn.is can't support complex Event Delegation

2008-11-26 Thread sliu
$(selector).index(target) != -1 may cause performance issue? reglib recursively check event.target and its ancestor to know whether it matches selector. another question, selector with nested context may help -- as I mentioned in the first post. but reglib and intercept don't provide. On

[jQuery] Re: $.fn.is can't support complex Event Delegation

2008-11-26 Thread Ariel Flesler
$(selector).index(target) != -1 may cause performance issue? reglib recursively check event.target and its ancestor to know whether it matches selector. It depends on the selector. I'm pretty sure it depends on many factors. If you (f.e) click an element that is deeply nested in the dom,