Updated the regex
updated the rgex because "Target the Parent of an Element Using jQuery" challenge was not accepting valid jquery closes #6955pull/6976/head
parent
ef4c8a1ffa
commit
34077ccd68
|
@ -821,7 +821,7 @@
|
|||
"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', 'message: Your <code>left-well</code> element should have a red background.');",
|
||||
"assert(code.match(/\\.parent\\s*\\(\\)\\s*\\.css/g), 'message: You should use the <code>.parent()</code> function to modify this element.');",
|
||||
"assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?#target1\\s*?(?:'|\")\\s*?\\)\\.parent/gi), 'message: The <code>.parent()</code> method should be called on the <code>#target1</code> element.');",
|
||||
"assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?#target1\\s*?(?:'|\")\\s*?\\)\\s*?\\.parent/gi), 'message: The <code>.parent()</code> method should be called on the <code>#target1</code> element.');",
|
||||
"assert(code.match(/<div class=\"well\" id=\"left-well\">/g), 'message: Only use jQuery to add these classes to the element.');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
|
|
Loading…
Reference in New Issue