});\r
\r
test("append(String|Element|Array<Element>|jQuery)", function() {\r
- expect(9);\r
+ expect(10);\r
var defaultText = 'Try them out:'\r
var result = $('#first').append('<b>buga</b>');\r
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );\r
ok( $("#sap").append([]), "Check for appending an empty array." );\r
ok( $("#sap").append(""), "Check for appending an empty string." );\r
ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );\r
+ \r
+ reset();\r
+ $("#sap").append(document.getElementById('form'));\r
+ ok( $("#sap>form").size() == 1, "Check for appending a form" );\r
+ \r
});\r
\r
test("appendTo(String|Element|Array<Element>|jQuery)", function() {\r
if ( arg.length === 0 )
return;
- if ( arg[0] == undefined )
+ if ( arg[0] == undefined || jQuery.nodeName(arg,"form") )
r.push( arg );
else
r = jQuery.merge( r, arg );