Skip to content
Permalink
Browse files

jquery event: closes #3107. Optimization to global event triggering. …

…Thanks Mike Helgeson.
  • Loading branch information
flesler committed Jul 1, 2008
1 parent 28937de commit cf78e396db1b986360c32fb0ca071a0fb90da064
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/event.js
@@ -168,7 +168,10 @@ jQuery.event = {
if ( !elem ) {
// Only trigger if we've ever bound an event for it
if ( this.global[type] )
jQuery("*").add([window, document]).trigger(type, data);
jQuery.each( jQuery.cache, function(){
if ( this.events && this.events[type] )
jQuery.event.trigger( type, data, this.handle.elem );
});

// Handle triggering a single element
} else {

0 comments on commit cf78e39

Please sign in to comment.
You can’t perform that action at this time.