Merge pull request #9299 from andmckvr13/fix/instructionsnottooclear

Fix Target the same element with multiple jQuery Selectors
pull/9491/head
Jonathan 2016-07-01 18:40:57 +01:00 committed by GitHub
commit 40e3b50898
1 changed files with 3 additions and 1 deletions

View File

@ -389,10 +389,12 @@
"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>.",
"Although it is possible to add multiple classes in a single <code>.addClass()</code> call, let's add them to the same element in <em>three separate ways</em>.",
"Using <code>.addClass()</code>, add only one class at a time to the same element, three different ways:",
"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>."
"Add the <code>btn-primary</code> class to the button with id <code>#target1</code>.",
"<strong>Note</strong><br>You should only be targeting one element and adding only one class at a time. Altogether, your three individual selectors will end up adding the three classes <code>shake</code>, <code>animated</code>, and <code>btn-primary</code> to <code>#target1</code>."
],
"challengeSeed": [
"fccss",