submit: "a.type=='submit'",
image: "a.type=='image'",
reset: "a.type=='reset'",
- button: 'a.type=="button"||a.nodeName=="BUTTON"',
+ button: 'a.type=="button"||a.nodeName.toUpperCase()=="BUTTON"',
input: "/input|select|textarea|button/i.test(a.nodeName)"
},
".": "jQuery.className.has(a,m[2])",
});
ret = r;
- t = jQuery.trim( t.replace( re, "" ) );
- foundToken = true;
+ t = t.replace( re, "" );
+ if ( foundToken = t.indexOf(" ") == 0 )
+ continue;
} else {
// Look for pre-defined expression tokens
for ( var i = 0; i < jQuery.token.length; i += 2 ) {
// Do a quick check for node name (where applicable) so
// that div#foo searches will be really fast
ret = r = oid &&
- (!m[3] || oid.nodeName == m[3].toUpperCase()) ? [oid] : [];
+ (!m[3] || oid.nodeName.toUpperCase() == m[3].toUpperCase()) ? [oid] : [];
} else {
// Pre-compile a regular expression to handle class searches