equals(jQuery("#first").children().length,1,"Only one child");
...
...
@@ -209,57 +209,57 @@ var testAppend = function(valueObj) {
equals(result.text(),defaultText+'buga','Check if text appending works');
equals(jQuery('#select3').append(valueObj('<option value="appendTest">Append Test</option>')).find('option:last-child').attr('value'),'appendTest','Appending html options to select element');
reset();
QUnit.reset();
varexpected="This link has class=\"blog\": Simon Willison's WeblogTry them out:";
equals(jQuery("#first").text(),defaultText+'buga','Check if text appending works');
equals(jQuery('<option value="appendTest">Append Test</option>').appendTo('#select3').parent().find('option:last-child').attr('value'),'appendTest','Appending html options to select element');
equals(jQuery("#main div").length,num,"Make sure all the removed divs were inserted.");
reset();
QUnit.reset();
});
vartestPrepend=function(val){
...
...
@@ -457,17 +457,17 @@ var testPrepend = function(val) {
equals(result.text(),'buga'+defaultText,'Check if text prepending works');
equals(jQuery('#select3').prepend(val('<option value="prependTest">Prepend Test</option>')).find('option:first-child').attr('value'),'prependTest','Prepending html options to select element');
reset();
QUnit.reset();
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
equals(jQuery('#first').text(),'buga'+defaultText,'Check if text prepending works');
equals(jQuery('<option value="prependTest">Prepend Test</option>').prependTo('#select3').parent().find('option:first-child').attr('value'),'prependTest','Prepending html options to select element');
reset();
QUnit.reset();
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
ok(jQuery("#first")[0],'Replace element with array of elements');
ok(jQuery("#mark")[0],'Replace element with array of elements');
ok(!jQuery("#yahoo")[0],'Verify that original element is gone, after array of elements');
reset();
QUnit.reset();
jQuery("#first, #mark").replaceAll("#yahoo");
ok(jQuery("#first")[0],'Replace element with set of elements');
ok(jQuery("#mark")[0],'Replace element with set of elements');
...
...
@@ -901,7 +901,7 @@ var testHtml = function(valueObj) {
equals(jQuery("#main").children().length,1,"Make sure there is a child element.");
equals(jQuery("#main").children()[0].nodeName.toUpperCase(),"STYLE","And that a style element was inserted.");
reset();
QUnit.reset();
// using contents will get comments regular, text, and comment nodes
varj=jQuery("#nonnodes").contents();
j.html(valueObj("<b>bold</b>"));
...
...
@@ -928,7 +928,7 @@ var testHtml = function(valueObj) {
equals(map[0].childNodes.length,1,"The area was inserted.");
equals(map[0].firstChild.nodeName.toLowerCase(),"area","The area was inserted.");
reset();
QUnit.reset();
jQuery("#main").html(valueObj('<script type="something/else">ok( false, "Non-script evaluated." );</script><script type="text/javascript">ok( true, "text/javascript is evaluated." );</script><script>ok( true, "No type is evaluated." );</script><div><script type="text/javascript">ok( true, "Inner text/javascript is evaluated." );</script><script>ok( true, "Inner No type is evaluated." );</script><script type="something/else">ok( false, "Non-script evaluated." );</script></div>'));
...
...
@@ -969,7 +969,7 @@ test("html(Function) with incoming value", function() {
})
ok(pass,"Set HTML");
reset();
QUnit.reset();
// using contents will get comments regular, text, and comment nodes