Make sure the fragment isn't used if it's not the same set we're working with. Fixes #6068.
This commit is contained in:
parent
a7dc66b832
commit
726fda08be
2 changed files with 15 additions and 6 deletions
|
@ -376,7 +376,7 @@ test("append(Function) with incoming value", function() {
|
|||
});
|
||||
|
||||
test("appendTo(String|Element|Array<Element>|jQuery)", function() {
|
||||
expect(12);
|
||||
expect(13);
|
||||
var defaultText = 'Try them out:'
|
||||
jQuery('<b>buga</b>').appendTo('#first');
|
||||
equals( jQuery("#first").text(), defaultText + 'buga', 'Check if text appending works' );
|
||||
|
@ -424,6 +424,11 @@ test("appendTo(String|Element|Array<Element>|jQuery)", function() {
|
|||
ok( jQuery("#moretests div:last").hasClass("test"), "appendTo element was modified after the insertion" );
|
||||
|
||||
reset();
|
||||
|
||||
div = jQuery("<div/>");
|
||||
jQuery("<span>a</span><b>b</b>").filter("span").appendTo( div );
|
||||
|
||||
equals( div.children().length, 1, "Make sure the right number of children were inserted." );
|
||||
});
|
||||
|
||||
var testPrepend = function(val) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue