Side navigation
Ticket #1242: patch-unload2one.txt
File patch-unload2one.txt, 0.4 KB (added by choan, May 24, 2007 12:52PM UTC)
Proposed patch
Index: src/event/event.js
===================================================================
--- src/event/event.js (revision 1957)
+++ src/event/event.js (working copy)
@@ -298,7 +298,7 @@
* @cat Events
*/
bind: function( type, data, fn ) {
- return this.each(function(){
+ return type == "unload" ? this.one(type, data, fn) : this.each(function(){
jQuery.event.add( this, type, fn || data, fn && data );
});
},
Download in other formats:
Original Format
File patch-unload2one.txt, 0.4 KB (added by choan, May 24, 2007 12:52PM UTC)
Proposed patch
Index: src/event/event.js
===================================================================
--- src/event/event.js (revision 1957)
+++ src/event/event.js (working copy)
@@ -298,7 +298,7 @@
* @cat Events
*/
bind: function( type, data, fn ) {
- return this.each(function(){
+ return type == "unload" ? this.one(type, data, fn) : this.each(function(){
jQuery.event.add( this, type, fn || data, fn && data );
});
},