equals(jQuery(this).css("display"),jQuery.support.inlineBlockNeedsLayout?"inline":"inline-block","inline-block was set on non-floated inline element when animating width/height");
equals(jQuery(this).css("display"),jQuery.support.inlineBlockNeedsLayout?"inline":"inline-block","inline-block was set on non-floated inline element when animating width/height");
equals(this.offsetWidth,42,"width was animated");
equals(this.offsetWidth,42,"width was animated");
equals(this.offsetHeight,42,"height was animated");
equals(this.offsetHeight,42,"height was animated");
equals(result.text(),defaultText+'buga','Check if text appending works');
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');
equals(jQuery("#select3").append(valueObj("<option value='appendTest'>Append Test</option>")).find("option:last-child").attr("value"),"appendTest","Appending html options to select element");
QUnit.reset();
QUnit.reset();
varexpected="This link has class=\"blog\": Simon Willison's WeblogTry them out:";
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("#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("<option value='appendTest'>Append Test</option>").appendTo("#select3").parent().find("option:last-child").attr("value"),"appendTest","Appending html options to select element");
equals(result.text(),'buga'+defaultText,'Check if text prepending works');
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');
equals(jQuery("#select3").prepend(val("<option value='prependTest'>Prepend Test</option>")).find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
QUnit.reset();
QUnit.reset();
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
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("#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');
equals(jQuery("<option value='prependTest'>Prepend Test</option>").prependTo("#select3").parent().find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
QUnit.reset();
QUnit.reset();
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
@@ -1113,15 +1113,15 @@ var testHtml = function(valueObj) {
...
@@ -1113,15 +1113,15 @@ var testHtml = function(valueObj) {
QUnit.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>'));
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>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj('<script type="text/javascript">ok( true, "jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (1)" );</script>'));
jQuery("#main").html(valueObj("<script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (1)' );</script>"));
jQuery("#main").html(valueObj('foo <form><script type="text/javascript">ok( true, "jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (2)" );</script></form>'));
jQuery("#main").html(valueObj("foo <form><script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (2)' );</script></form>"));
jQuery("#main").html(valueObj("<script>equals(jQuery.scriptorder++, 0, 'Script is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equals(jQuery.scriptorder++, 1, 'Script (nested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equals(jQuery.scriptorder++, 2, 'Script (unnested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script>"));
jQuery("#main").html(valueObj("<script>equals(jQuery.scriptorder++, 0, 'Script is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equals(jQuery.scriptorder++, 1, 'Script (nested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equals(jQuery.scriptorder++, 2, 'Script (unnested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script>"));
}
}
...
@@ -1178,22 +1178,22 @@ test("html(Function) with incoming value", function() {
...
@@ -1178,22 +1178,22 @@ test("html(Function) with incoming value", function() {
equals(null,null,"Make sure the incoming value is correct.");
equals(null,null,"Make sure the incoming value is correct.");
}
}
j.find('b').removeData();
j.find("b").removeData();
equals(j.html().replace(/ xmlns="[^"]+"/g,"").toLowerCase(),"<b>bold</b>","Check node,textnode,comment with html()");
equals(j.html().replace(/ xmlns="[^"]+"/g,"").toLowerCase(),"<b>bold</b>","Check node,textnode,comment with html()");
var$div=jQuery('<div />');
var$div=jQuery("<div />");
equals($div.html(function(i,val){
equals($div.html(function(i,val){
equals(val,"","Make sure the incoming value is correct.");
equals(val,"","Make sure the incoming value is correct.");
return5;
return5;
}).html(),'5','Setting a number as html');
}).html(),"5","Setting a number as html");
equals($div.html(function(i,val){
equals($div.html(function(i,val){
equals(val,"5","Make sure the incoming value is correct.");
equals(val,"5","Make sure the incoming value is correct.");