});
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' );
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) {
}
var testHtml = function(valueObj) {
- expect(24);
+ expect(26);
jQuery.scriptorder = 0;
equals( div.children().length, 2, "Make sure two child nodes exist." );
equals( div.children().children().length, 1, "Make sure that a grandchild exists." );
+ equals( jQuery("<div/>").html(valueObj(" "))[0].innerHTML, " ", "Make sure entities are passed through correctly." );
+ equals( jQuery("<div/>").html(valueObj("&"))[0].innerHTML, "&", "Make sure entities are passed through correctly." );
+
reset();
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();