Merge pull request #3854 from natac13/fix/unclear-description-target-with-jquery-selectors-#3845
fixed unclear description for jQuery challenge using all selectorspull/3868/head
commit
844f978fb0
|
@ -255,8 +255,10 @@
|
|||
"title": "Target the same element with multiple jQuery Selectors",
|
||||
"description": [
|
||||
"Now you know three ways of targeting elements: by type: <code>$(\"button\")</code>, by class: <code>$(\".btn\")</code>, and by id <code>$(\"#target1\")</code>.",
|
||||
"Use each of these jQuery selectors to target your <code>button</code> element with the class <code>btn</code> and the id <code>target1</code>.",
|
||||
"Use the <code>addClass()</code> jQuery function to give the element one new class for each selector: <code>animated</code>, <code>shake</code>, and <code>btn-primary</code>."
|
||||
"Using each of the above jQuery selectors and the <code>addClass()</code> function:",
|
||||
"Add the <code>animated</code> class to all elements with type <code>button</code>.",
|
||||
"Add the <code>shake</code> class to all the buttons with class <code>.btn</code>.",
|
||||
"Add the <code>btn-primary</code> class to the button with id <code>#target1</code>."
|
||||
],
|
||||
"tests": [
|
||||
"assert(editor.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?button\\s*?(?:'|\")/gi), 'Use the <code>$(\"button\")</code> selector.')",
|
||||
|
|
Loading…
Reference in New Issue