diff options
author | John Resig <jeresig@gmail.com> | 2006-10-12 16:30:54 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2006-10-12 16:30:54 +0000 |
commit | 96d429b940be462d5908d9a79fbcb2717f9211e5 (patch) | |
tree | 92e64c601942f4bab29e5e9434949a257c1af2ba | |
parent | 2e544e9eb89c87b9eac6df445474d21e9be604eb (diff) | |
download | jquery-96d429b940be462d5908d9a79fbcb2717f9211e5.tar.gz jquery-96d429b940be462d5908d9a79fbcb2717f9211e5.zip |
Fixed some issues with IE and XML structures.
-rw-r--r-- | src/jquery/jquery.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 965c2798a..9edd75865 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -50,7 +50,7 @@ jQuery = function(a,c) { return new jQuery(a,c); // Handle HTML strings - if (typeof a == "string") { + if ( a.constructor == String ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } @@ -1571,7 +1571,7 @@ jQuery.extend({ empty: "!a.childNodes.length", // Text Check - contains: "((a.firstChild && a.firstChild.nodeValue)||a.innerText||a.innerHTML).indexOf(m[3])>=0", + contains: "jQuery.fn.text.apply([a]).indexOf(m[3])>=0", // Visibility visible: "a.type!='hidden'&&jQuery.css(a,'display')!='none'&&jQuery.css(a,'visibility')!='hidden'", @@ -1872,7 +1872,7 @@ jQuery.extend({ return elem.getAttributeNode(name).nodeValue; } else if ( elem.getAttribute != undefined && elem.tagName ) { // IE elem.getAttribute passes even for style if ( value != undefined ) elem.setAttribute( name, value ); - return elem.getAttribute( name, 2 ); + return elem.getAttribute( name ); } else { name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); if ( value != undefined ) elem[name] = value; |