});
test( "append(Function) returns Element", function() {
-
+
expect( 2 );
var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:",
old = jQuery("#sap").html();
});
test( "append(Function) returns Array<Element>", function() {
-
+
expect( 2 );
var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo",
old = jQuery("#sap").html();
});
test( "append(Function) returns jQuery", function() {
-
+
expect( 2 );
var expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:",
old = jQuery("#sap").html();
});
test( "append(Function) returns Number", function() {
-
+
expect( 2 );
var old = jQuery("#sap").html();
});
test( "appendTo(String)", function() {
-
+
expect( 4 );
var l, defaultText;
});
test( "appendTo(Element|Array<Element>)", function() {
-
+
expect( 2 );
-
+
var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
jQuery( document.getElementById("first") ).appendTo("#sap");
equal( jQuery("#sap").text(), expected, "Check for appending of element" );
});
test( "appendTo(jQuery)", function() {
-
+
expect( 10 );
-
+
var expected, num, div;
ok( jQuery(document.createElement("script")).appendTo("body").length, "Make sure a disconnected script can be appended." );
});
test( "prepend(String)", function() {
-
+
expect( 2 );
var result, expected;
});
test( "prepend(Element)", function() {
-
+
expect( 1 );
var expected;
});
test( "prepend(Array<Element>)", function() {
-
+
expect( 1 );
var expected;
});
test( "prepend(jQuery)", function() {
-
+
expect( 1 );
var expected;
});
test( "prepend(Array<jQuery>)", function() {
-
+
expect( 1 );
var expected;
});
test( "prepend(Function) with incoming value -- Element", function() {
-
+
expect( 2 );
var old, expected;
});
test( "prepend(Function) with incoming value -- Array<Element>", function() {
-
+
expect( 2 );
var old, expected;
jQuery("<b>buga</b>").prependTo("#first");
equal( jQuery("#first").text(), "buga" + defaultText, "Check if text prepending works" );
equal( jQuery("<option value='prependTest'>Prepend Test</option>").prependTo("#select3").parent().find("option:first-child").attr("value"), "prependTest", "Prepending html options to select element" );
-
+
});
test( "prependTo(Element)", function() {
jQuery("#yahoo").before( manipulationBareObj(jQuery("#mark, #first")) );
equal( jQuery("#en").text(), expected, "Insert jQuery before" );
});
-
+
test( "before(Array<jQuery>)", function() {
expect( 1 );
jQuery("#yahoo").before( manipulationFunctionReturningObj(jQuery("#mark, #first")) );
equal( jQuery("#en").text(), expected, "Insert jQuery before" );
});
-
+
test( "before(Function) -- Returns Array<jQuery>", function() {
expect( 1 );
test( ".before() and .after() disconnected node", function() {
expect(2);
-
+
equal( jQuery("<input type='checkbox'/>").before("<div/>").length, 1, "before() on disconnected node is no-op" );
equal( jQuery("<input type='checkbox'/>").after("<div/>").length, 1, "after() on disconnected node is no-op" );
});
test( ".after(String)", function() {
expect( 1 );
-
+
var expected = "This is a normal link: Yahoobuga";
jQuery("#yahoo").after( "<b>buga</b>" );
equal( jQuery("#en").text(), expected, "Insert String after" );
test( "insertAfter(Element)", function() {
expect(1);
-
+
var expected = "This is a normal link: YahooTry them out:";
jQuery( document.getElementById("first") ).insertAfter("#yahoo");
equal( jQuery("#en").text(), expected, "Insert element after" );
test( "insertAfter(Array<Element>)", function() {
expect(1);
-
+
var expected = "This is a normal link: YahooTry them out:diveintomark";
jQuery( [ document.getElementById("first"), document.getElementById("mark") ] ).insertAfter("#yahoo");
equal( jQuery("#en").text(), expected, "Insert array of elements after" );
test( "insertAfter(jQuery)", function() {
expect(1);
-
+
var expected = "This is a normal link: YahoodiveintomarkTry them out:";
jQuery("#mark, #first").insertAfter("#yahoo");
equal( jQuery("#en").text(), expected, "Insert jQuery after" );
equal( jQuery("#first").children().length, 1, "Only one child" );
ok( jQuery("#first").children().is(".red"), "Verify Right Element" );
equal( jQuery("#first").children().children().children().length, num, "Verify Elements Intact" );
-
+
num = jQuery("#first").html("foo<div>test</div><div>test2</div>").children().length;
jQuery("#first").wrapInner( "<div class='red'><div id='tmp'></div></div>" );
equal( jQuery("#first").children().length, 1, "Only one child" );
var num,
div = jQuery("<div/>");
-
+
num = jQuery("#first").children().length;
jQuery("#first").wrapInner( document.getElementById("empty") );
equal( jQuery("#first").children().length, 1, "Only one child" );
equal( jQuery("#first").children().length, 1, "Only one child" );
ok( jQuery("#first").children().is(".red"), "Verify Right Element" );
equal( jQuery("#first").children().children().children().length, num, "Verify Elements Intact" );
-
+
num = jQuery("#first").html("foo<div>test</div><div>test2</div>").children().length;
jQuery("#first").wrapInner( val("<div class='red'><div id='tmp'></div></div>") );
equal( jQuery("#first").children().length, 1, "Only one child" );
var num,
val = manipulationFunctionReturningObj,
div = jQuery("<div/>");
-
+
num = jQuery("#first").children().length;
jQuery("#first").wrapInner( val(document.getElementById("empty")) );
equal( jQuery("#first").children().length, 1, "Only one child" );