jQuery: The Write Less, Do More JavaScript Library

Prototype's custom event bubbling

View: New views
2 Messages — Rating Filter:   Alert me  

Prototype's custom event bubbling

by wycats :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

To quickly do event bubbling with custom events, Prototype creates a *real* click event, modifies it, and fires that. As a result, the browser takes care of bubbling. It's fast, and, as far as I can tell, foolproof.

What do you guys think about doing something like that in jQuery?

--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to jquery-dev@...
To unsubscribe from this group, send email to jquery-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Prototype's custom event bubbling

by Arrix :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Prototype's Element#fire does not support firing native events whereas jQuery's trigger does. $.fn.trigger differs from Element#fire that it only triggers the handlers but does not actually create and dispatch the event.

If jQuery is to use the *real* event technique, will $.fn.trigger behave consistently for custom events and native events?

On Sat, Oct 4, 2008 at 4:36 AM, Yehuda Katz <wycats@...> wrote:
To quickly do event bubbling with custom events, Prototype creates a *real* click event, modifies it, and fires that. As a result, the browser takes care of bubbling. It's fast, and, as far as I can tell, foolproof.

What do you guys think about doing something like that in jQuery?

--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325





--
Arrix

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to jquery-dev@...
To unsubscribe from this group, send email to jquery-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---