On Tue, Feb 22, 2011 at 3:30 AM, RobG <[email protected]> wrote: > > > On Feb 22, 12:09 pm, Diego Perini <[email protected]> wrote: >> Mark, >> use event "delegation" and only setup one listener on the "document" >> for the type of event you want notifications. > > And for those events that don't bubble? >
In older browsers like IE only few events do not bubble and those are the events bound to form controls (submit/reset/change/focus/blur). In newer browsers using the W3C Events recommendations any event can be captured before it reaches the target, even in IE9. Depending on the objectives there are several alternatives for IE6, IE7 and IE8. An example would be using "focusin/focusout" events that are bubbling cousins of the "blur/focus" events. One could also use MSIE activation events (onbeforeactivate, onbeforedeactivate) to simulate a capturing phase on those elements. If a complete cross-browser implementation is needed you can use my NWEvents project or even Dean Edwards Base2 behaviors. Both of them implement event "delegation" cross-browser and have these feature available (capturing/bubbling) on any elements. -- Diego > > -- > Rob > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
