jquery event: closes #3107. Optimization to global event triggering. Thanks Mike Helgeson.
This commit is contained in:
parent
28937ded0e
commit
cf78e396db
1 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue