Fixed another bug with retreiving elements by ID.

This commit is contained in:
John Resig 2006-06-11 18:27:31 +00:00
parent b5256caee6
commit 4b6bcb235f

3
jquery/jquery.js vendored
View file

@ -523,7 +523,7 @@ $.Select = function( t, context ) {
if ( m[1] == "#" ) { // Ummm, should make this work in all XML docs
var oid = document.getElementById(m[2]);
r = oid ? [oid] : [];
r = ret = oid ? [oid] : [];
t = t.replace( re2, "" );
} else {
if ( m[2] === "" || m[1] == "." ) { m[2] = "*"; }
@ -564,6 +564,7 @@ $.Select = function( t, context ) {
if ( ret && ret[0] == context ) { ret.shift(); }
done = $.merge( done, ret );
return done;
};