aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-03-01 12:44:56 -0500
committerjeresig <jeresig@gmail.com>2010-03-01 12:44:56 -0500
commita18f682012ae8e63f3b43b39375b3c5ce0a561e3 (patch)
treee897c8e14067e1fd3ef7bd658f0ef91afdcf7d0a /src/event.js
parent5353c6bcc352c4d900cc76af110e56ee1e70ae0f (diff)
downloadjquery-a18f682012ae8e63f3b43b39375b3c5ce0a561e3.tar.gz
jquery-a18f682012ae8e63f3b43b39375b3c5ce0a561e3.zip
Made some code tweaks related to running jQuery through JSLint (thanks to Lorin Larson for the JSLint run).
Diffstat (limited to 'src/event.js')
-rw-r--r--src/event.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/event.js b/src/event.js
index b55208066..761665cb6 100644
--- a/src/event.js
+++ b/src/event.js
@@ -51,7 +51,7 @@ jQuery.event = {
}
var events = elemData.events = elemData.events || {},
- eventHandle = elemData.handle, eventHandle;
+ eventHandle = elemData.handle;
if ( !eventHandle ) {
elemData.handle = eventHandle = function() {
@@ -980,10 +980,10 @@ jQuery.each(["live", "die"], function( i, name ) {
if ( name === "live" ) {
// bind live handler
- context.each(function(){
- jQuery.event.add( this, liveConvert( type, selector ),
+ for ( var j = 0, l = context.length; j < l; j++ ) {
+ jQuery.event.add( context[j], liveConvert( type, selector ),
{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
- });
+ }
} else {
// unbind live handler
@@ -992,7 +992,7 @@ jQuery.each(["live", "die"], function( i, name ) {
}
return this;
- }
+ };
});
function liveHandler( event ) {