diff options
author | Ariel Flesler <aflesler@gmail.com> | 2009-01-02 22:23:52 +0000 |
---|---|---|
committer | Ariel Flesler <aflesler@gmail.com> | 2009-01-02 22:23:52 +0000 |
commit | 989e3f61f78c773d5c6066152c0bf3fd61d752ed (patch) | |
tree | 8edd44e847504865ea71cfd5a271dff82c52114d /src/event.js | |
parent | d20e7fede1ea2e7047a34a1749bc127c22b02049 (diff) | |
download | jquery-989e3f61f78c773d5c6066152c0bf3fd61d752ed.tar.gz jquery-989e3f61f78c773d5c6066152c0bf3fd61d752ed.zip |
jquery event: closes #3772. The extra function on $.event.trigger isn't supported anymore.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/event.js b/src/event.js index 97565a84a..414f9420e 100644 --- a/src/event.js +++ b/src/event.js @@ -163,7 +163,7 @@ jQuery.event = { } }, - trigger: function( event, data, elem, extra) { + trigger: function( event, data, elem) { // Event object or event type var type = event.type || event; @@ -227,15 +227,6 @@ jQuery.event = { // Extra functions don't get the custom event object data.shift(); - // Handle triggering of extra function - if ( extra && jQuery.isFunction( extra ) ) { - // call the extra function and tack the current return value on the end for possible inspection - var ret = extra.apply( elem, event.result == null ? data : data.concat( event.result ) ); - // if anything is returned, give it precedence and have it overwrite the previous value - if ( ret !== undefined ) - event.result = ret; - } - // Trigger the native events (except for clicks on links) if ( event.target === elem && fn && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) { this.triggered = true; @@ -508,18 +499,18 @@ jQuery.fn.extend({ }); }, - trigger: function( type, data, fn ) { + trigger: function( type, data ) { return this.each(function(){ - jQuery.event.trigger( type, data, this, fn ); + jQuery.event.trigger( type, data, this ); }); }, - triggerHandler: function( type, data, fn ) { + triggerHandler: function( type, data ) { if( this[0] ){ var event = jQuery.Event(type); event.preventDefault(); event.stopPropagation(); - jQuery.event.trigger( event, data, this[0], fn ); + jQuery.event.trigger( event, data, this[0] ); return event.result; } }, |