diff options
Diffstat (limited to 'src/jquery/jquery.js')
-rw-r--r-- | src/jquery/jquery.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 9dcccb93a..ca4051f3d 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -38,14 +38,14 @@ var jQuery = function(a,c) { // Handle HTML strings if ( typeof a == "string" ) { + // HANDLE: $(html) -> $(array) var m = /^[^<]*(<.+>)[^>]*$/.exec(a); - - a = m ? - // HANDLE: $(html) -> $(array) - jQuery.clean( [ m[1] ] ) : + if ( m ) + a = jQuery.clean( [ m[1] ] ); - // HANDLE: $(expr) - jQuery.find( a, c ); + // HANDLE: $(expr) + else + return new jQuery( c ).find( a ); } return this.setArray( |