git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updating the source version to 1.4.3pre.
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
6c6d006
..
3389e83
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-33,6
+33,9
@@
var jQuery = function( selector, context ) {
// Check for non-word characters
rnonword = /\W/,
// Check for non-word characters
rnonword = /\W/,
+ // Check for digits
+ rdigit = /\d/,
+
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
@@
-91,7
+94,7
@@
jQuery.fn = jQuery.prototype = {
}
// The body element only exists once, optimize finding it
}
// The body element only exists once, optimize finding it
- if ( selector === "body" && !context ) {
+ if ( selector === "body" && !context && document.body ) {
this.context = document;
this[0] = document.body;
this.selector = "body";
this.context = document;
this[0] = document.body;
this.selector = "body";
@@
-488,6
+491,10
@@
jQuery.extend({
return obj && typeof obj === "object" && "setInterval" in obj;
},
return obj && typeof obj === "object" && "setInterval" in obj;
},
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
type: function( obj ) {
return obj == null ?
String( obj ) :
type: function( obj ) {
return obj == null ?
String( obj ) :