Merge pull request #7823 from erictleung/fix/outdated-italicize-method

Change italic method to em in Change Text jQuery
This commit is contained in:
Justin Richardsson
2016-03-31 09:23:29 -04:00

View File

@ -547,7 +547,7 @@
"Using jQuery, you can change the text between the start and end tags of an element. You can even change HTML markup.", "Using jQuery, you can change the text between the start and end tags of an element. You can even change HTML markup.",
"jQuery has a function called <code>.html()</code> 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.", "jQuery has a function called <code>.html()</code> 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:", "Here's how you would rewrite and italicize the text of our heading:",
"<code>$(\"h3\").html(\"&#60;i&#62;jQuery Playground&#60;/i&#62;\");</code>", "<code>$(\"h3\").html(\"&#60;em&#62;jQuery Playground&#60;/em&#62;\");</code>",
"jQuery also has a similar function called <code>.text()</code> that only alters text without adding tags.", "jQuery also has a similar function called <code>.text()</code> that only alters text without adding tags.",
"Change the button with id <code>target4</code> by italicizing its text." "Change the button with id <code>target4</code> by italicizing its text."
], ],
@ -556,7 +556,7 @@
"fccss", "fccss",
" $(document).ready(function() {", " $(document).ready(function() {",
" $(\"#target1\").css(\"color\", \"red\");", " $(\"#target1\").css(\"color\", \"red\");",
"", " ",
" });", " });",
"fcces", "fcces",
"", "",
@ -585,9 +585,9 @@
"</div>" "</div>"
], ],
"tests": [ "tests": [
"assert.isTrue((/<i>#target4<\\/i>/gi).test($(\"#target4\").html()), 'message: Italicize the text in your <code>target4</code> button by adding HTML tags.');", "assert.isTrue((/<em>#target4<\\/em>/gi).test($(\"#target4\").html()), 'message: Italicize the text in your <code>target4</code> button by adding HTML tags.');",
"assert($(\"#target4\") && $(\"#target4\").text() === '#target4', 'message: Make sure the text is otherwise unchanged.');", "assert($(\"#target4\") && $(\"#target4\").text() === '#target4', 'message: Make sure the text is otherwise unchanged.');",
"assert.isFalse((/<i>/gi).test($(\"h3\").html()), 'message: Do not alter any other text.');" "assert.isFalse((/<em>/gi).test($(\"h3\").html()), 'message: Do not alter any other text.');"
], ],
"type": "waypoint", "type": "waypoint",
"challengeType": 0, "challengeType": 0,