X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fevent.js;h=c0238ccab7256c39ef73cc2b84f9c57e30628d90;hb=b32ec31d896eb163c5f3d9b54ca9da3c0dd90ce0;hp=b27b418430cab1a8e96d2b7e0cd0700a13d3c115;hpb=d1b9ad3cdb3fd226d4208ae6eaed98baf7026222;p=jquery.git diff --git a/src/event.js b/src/event.js index b27b418..c0238cc 100644 --- a/src/event.js +++ b/src/event.js @@ -102,7 +102,7 @@ jQuery.event = { if ( events ) { // Unbind all events for the element - if ( !types ) + if ( types == undefined ) for ( var type in events ) this.remove( elem, type ); else { @@ -196,7 +196,7 @@ jQuery.event = { data.shift(); // Handle triggering of extra function - if ( extra ) { + 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, data.concat( val ) ); // if anything is returned, give it precedence and have it overwrite the previous value