Ticket #1242: patch-unload2one.txt
File patch-unload2one.txt, 433 bytes (added by , 15 years ago) |
---|
Line | |
---|---|
1 | Index: src/event/event.js |
2 | =================================================================== |
3 | --- src/event/event.js (revision 1957) |
4 | +++ src/event/event.js (working copy) |
5 | @@ -298,7 +298,7 @@ |
6 | * @cat Events |
7 | */ |
8 | bind: function( type, data, fn ) { |
9 | - return this.each(function(){ |
10 | + return type == "unload" ? this.one(type, data, fn) : this.each(function(){ |
11 | jQuery.event.add( this, type, fn || data, fn && data ); |
12 | }); |
13 | }, |