Optimize for the case where a fragment-bound element is being injected into one other element.

This commit is contained in:
jeresig 2010-01-28 16:30:37 -05:00
parent 98c7248518
commit 0db207da23
2 changed files with 20 additions and 11 deletions

View file

@ -100,6 +100,8 @@ jQuery.fn = jQuery.prototype = {
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
}
return jQuery.merge( this, selector );
// HANDLE: $("#id")
} else {
elem = document.getElementById( match[2] );