aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2006-12-15 08:20:46 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2006-12-15 08:20:46 +0000
commit18e330741f7e80aaa38ca700ab8a5884d6e671eb (patch)
treed35c11e095a06962eb9660197e7d833412ff242b
parent3e165ae5ab080236eb0df35c691d6f3127c6499e (diff)
downloadjquery-18e330741f7e80aaa38ca700ab8a5884d6e671eb.tar.gz
jquery-18e330741f7e80aaa38ca700ab8a5884d6e671eb.zip
Replaced the rest of the x.constructor != String comparions with typeof (Thanks Kelvin)
-rw-r--r--src/jquery/jquery.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index 177d86bf7..554726e3d 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -390,7 +390,7 @@ jQuery.fn = jQuery.prototype = {
*/
attr: function( key, value, type ) {
// Check to see if we're setting style values
- return key.constructor != String || value != undefined ?
+ return typeof key != "string" || value != undefined ?
this.each(function(){
// See if we're setting a hash of styles
if ( value == undefined )
@@ -1456,7 +1456,7 @@ jQuery.extend({
// Set the correct context (if none is provided)
context = context || document;
- if ( t.constructor != String ) return [t];
+ if ( typeof t != "string" ) return [t];
if ( !t.indexOf("//") ) {
context = context.documentElement;
@@ -1645,7 +1645,7 @@ jQuery.extend({
// Otherwise, find the expression to execute
else {
var f = jQuery.expr[m[1]];
- if ( f.constructor != String )
+ if ( typeof f != "string" )
f = jQuery.expr[m[1]][m[2]];
// Build a custom macro to enclose it