]> source.dussan.org Git - jquery.git/commitdiff
Fixed another bug with retreiving elements by ID.
authorJohn Resig <jeresig@gmail.com>
Sun, 11 Jun 2006 18:27:31 +0000 (18:27 +0000)
committerJohn Resig <jeresig@gmail.com>
Sun, 11 Jun 2006 18:27:31 +0000 (18:27 +0000)
jquery/jquery.js

index 8398c0d7e0006a4d8aec0309dac99c5bb6bffd68..9f35e1a91348d74cf763e97fa17fd2c4bd0212cf 100644 (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;
 };