aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-03-01 18:19:29 -0500
committerjeresig <jeresig@gmail.com>2010-03-01 18:19:29 -0500
commita4043cdcbfa1ca069265a7cbcaba269629789cc0 (patch)
tree2659778180cecf9f08614f814e34bac5beefe42f /src
parentfc08d0ea8dc881ed56102eb14e3ad9c54cccc34e (diff)
downloadjquery-a4043cdcbfa1ca069265a7cbcaba269629789cc0.tar.gz
jquery-a4043cdcbfa1ca069265a7cbcaba269629789cc0.zip
Land some additional tweaks related to running through JSLint.
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js2
-rw-r--r--src/core.js12
-rw-r--r--src/event.js2
-rw-r--r--src/manipulation.js2
-rw-r--r--src/traversing.js3
5 files changed, 10 insertions, 11 deletions
diff --git a/src/ajax.js b/src/ajax.js
index e17dfa89a..c5191ef6e 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -2,7 +2,7 @@ var jsc = now(),
rscript = /<script(.|\s)*?\/script>/gi,
rselectTextarea = /select|textarea/i,
rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
- jsre = /=\?(&|$)/,
+ jsre = /\=\?(&|$)/,
rquery = /\?/,
rts = /(\?|&)_=.*?(&|$)/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
diff --git a/src/core.js b/src/core.js
index e2e60a9a7..16d052963 100644
--- a/src/core.js
+++ b/src/core.js
@@ -49,7 +49,7 @@ var jQuery = function( selector, context ) {
// Save a reference to some core methods
toString = Object.prototype.toString,
- hasOwnProperty = Object.prototype.hasOwnProperty,
+ hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
indexOf = Array.prototype.indexOf;
@@ -450,9 +450,9 @@ jQuery.extend({
}
// Not own constructor property must be Object
- if ( obj.constructor
- && !hasOwnProperty.call(obj, "constructor")
- && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
@@ -462,7 +462,7 @@ jQuery.extend({
var key;
for ( key in obj ) {}
- return key === undefined || hasOwnProperty.call( obj, key );
+ return key === undefined || hasOwn.call( obj, key );
},
isEmptyObject: function( obj ) {
@@ -803,5 +803,5 @@ function access( elems, key, value, exec, fn, pass ) {
}
function now() {
- return (new Date).getTime();
+ return (new Date()).getTime();
}
diff --git a/src/event.js b/src/event.js
index 761665cb6..abfdc4f1c 100644
--- a/src/event.js
+++ b/src/event.js
@@ -187,7 +187,7 @@ jQuery.event = {
type = namespaces.shift();
namespace = new RegExp("(^|\\.)" +
- jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)")
+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
}
eventType = events[ type ];
diff --git a/src/manipulation.js b/src/manipulation.js
index 196f23072..529280a62 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -205,7 +205,7 @@ jQuery.fn.extend({
return jQuery.clean([html.replace(rinlinejQuery, "")
// Handle the case in IE 8 where action=/test/> self-closes a tag
- .replace(/=([^="'>\s]+\/)>/g, '="$1">')
+ .replace(/\=([^="'>\s]+\/)>/g, '="$1">')
.replace(rleadingWhitespace, "")], ownerDocument)[0];
} else {
return this.cloneNode(true);
diff --git a/src/traversing.js b/src/traversing.js
index 6ae9924a3..e597e2041 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -1,8 +1,7 @@
var runtil = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
// Note: This RegExp should be improved, or likely pulled from Sizzle
- rmultiselector = /,/,
- slice = Array.prototype.slice;
+ rmultiselector = /,/;
// Implement the identical functionality for filter and not
var winnow = function( elements, qualifier, keep ) {