From 4b6bcb235fc4ae30692d27910dffbf79295e36f4 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sun, 11 Jun 2006 18:27:31 +0000 Subject: [PATCH] Fixed another bug with retreiving elements by ID. --- jquery/jquery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jquery/jquery.js b/jquery/jquery.js index 8398c0d..9f35e1a 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -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; }; -- 1.7.10.4