diff --git a/challenges/jquery.json b/challenges/jquery.json
index 0ad2a48005..358ad754d8 100644
--- a/challenges/jquery.json
+++ b/challenges/jquery.json
@@ -263,9 +263,9 @@
"Use the addClass()
jQuery function to give the element one new class for each selector: animated
, shake
, and btn-primary
."
],
"tests": [
- "assert(editor.match(/\\$\\(.*button/g), 'Use the $(\"button\")
selector.')",
- "assert(editor.match(/\\$\\(.*\\.btn/g), 'Use the $(\".btn\")
selector.')",
- "assert(editor.match(/\\$\\(.*#target1/g), 'Use the $(\"#target1\")
selector.')",
+ "assert((editor.match(/\\$\\(\\'button\\'/g) || editor.match(/\\$\\(\"button\"/g)), 'Use the $(\"button\")
selector.')",
+ "assert((editor.match(/\\$\\(\\'\\.btn\\'/g) || editor.match(/\\$\\(\"\\.btn\"/g)), 'Use the $(\".btn\")
selector.')",
+ "assert((editor.match(/\\$\\(\\'#target1\\'/g) || editor.match(/\\$\\(\"#target1\"/g)), 'Use the $(\"#target1\")
selector.')",
"assert(editor.match(/addClass/g) && editor.match(/addClass/g).length > 2, 'Only add one class with each of your three selectors.')",
"assert($(\"#target1\").hasClass(\"animated\") && $(\"#target1\").hasClass(\"shake\") && $(\"#target1\").hasClass(\"btn-primary\"), 'Your #target1
element should have the classes animated
shake
and btn-primary
.')",
"assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
@@ -627,7 +627,8 @@
],
"tests": [
"assert($(\"#left-well\").css(\"background-color\") === 'red' || $(\"#left-well\").css(\"background-color\") === 'rgb(255, 0, 0)' || $(\"#left-well\").css(\"background-color\").toLowerCase() === '#ff0000' || $(\"#left-well\").css(\"background-color\").toLowerCase() === '#f00', 'Your left-well
element should have a red background.')",
- "assert(editor.match(/\\.parent\\(\\)\\.css/g), 'You should use the parent()
function to modify this element.')",
+ "assert(editor.match(/\\.parent\\(\\)\\.css/g), 'You should use the .parent()
function to modify this element.')",
+ "assert((editor.match(/\\$\\(\\'#target1\\'\\)\\.parent/g) || editor.match(/\\$\\(\"#target1\"\\)\\.parent/g)), 'The .parent()
method should be called on the #target1
element.')",
"assert(editor.match(/