.html()
that lets you add HTML tags and text within an element. Any content previously within the element will be completely replaced with the content you provide using this function.",
+ "Here's how you would rewrite and italicize the text of our heading:",
+ "$(\"h3\").html(\"<i>jQuery Funhouse</i>\");
",
+ "jQuery also has a similar function called .text()
that only alters text without adding tags.",
+ "Change the button with id target4
by italicizing its text."
+ ],
+ "tests": [
+ "assert.isTrue((//gi).test($(\"#target4\").html()), 'Italicize the text in your target4
button by adding HTML tags.')",
+ "assert($(\"#target4\") && $(\"#target4\").text() === '#target4', 'Make sure the text is otherwise unchanged.')",
+ "assert.isFalse((//gi).test($(\"h3\").html()), 'Do not alter any other text.')"
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $(\"#target1\").css(\"color\", \"red\");",
+ "",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "