mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): update favorite icon toggler requirements (#59679)
This commit is contained in:
parent
4d11cd8ddb
commit
392fa65e07
@ -18,8 +18,8 @@ Fulfill the user stories below and get all the tests to pass to complete the lab
|
||||
2. The unordered list should have the class `item-list`.
|
||||
3. The three list items should contain the item name followed by a `button` element with the class `favorite-icon`.
|
||||
4. The `button` element should contain the code `♡` initially to represent an empty heart.
|
||||
5. You should create a `filled` class that should contain style information.
|
||||
6. When a `button` element containing a heart is clicked, you should add the `filled` class to the clicked `button` if it's not already present, and remove it, if it is.
|
||||
5. When a `button` element containing a heart is clicked, you should add a class named `filled` to the clicked `button` if it's not already present, and remove it, if it is.
|
||||
6. You should have a class selector that targets the `filled` class and sets some CSS properties.
|
||||
7. When a `button` element containing a heart is clicked, the heart symbol should toggle between `♡` (empty heart) and `❤` (filled heart), depending on its current state.
|
||||
|
||||
**Note:** Be sure to link your JavaScript file in your HTML. (Ex. `<script src="script.js"></script>`)
|
||||
@ -67,7 +67,7 @@ for (let input of inputs) {
|
||||
}
|
||||
```
|
||||
|
||||
The `filled` class should contain style information.
|
||||
You should have a `.filled` selector that sets some CSS properties.
|
||||
|
||||
```js
|
||||
const filled = new __helpers.CSSHelp(document).getStyle('.filled');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user