more about wrap() methods

more about wrap() methods


If I do this:
$("h1").wrap("<i></i><i></i>")
Then I get two copies of each of the h1 tags. The return value of the
wrap() method does not include the extra copies, however. Is this a bug?
If so, maybe change this line in wrapAll:
    
    var wrap = jQuery( html, this[0].ownerDocument).clone();
To this:
    var wrap = jQuery( html, this[0].ownerDocument).eq(0).clone();
David