Ticket #1253: event.js2.diff
| File event.js2.diff, 910 bytes (added by john, 6 years ago) |
|---|
-
src/event/event.js
300 300 * @cat Events 301 301 */ 302 302 bind: function( type, data, fn ) { 303 return type == "unload" ? this.one(type, data, fn) : this.each(function(){ 304 jQuery.event.add( this, type, fn || data, fn && data ); 303 return type == "unload" ? this.one(type, data, fn) : this.each(function(i,elem){ 304 jQuery.each( type.split(/\s+/), function(){ 305 jQuery.event.add( elem, this, fn || data, fn && data ); 306 }); 305 307 }); 306 308 }, 307 309 … … 370 372 * @cat Events 371 373 */ 372 374 unbind: function( type, fn ) { 373 return this.each(function(){ 374 jQuery.event.remove( this, type, fn ); 375 return this.each(function(i,elem){ 376 jQuery.each( type.split(/\s+/), function(){ 377 jQuery.event.remove( elem, this, fn ); 378 }); 375 379 }); 376 380 }, 377 381
