mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-29 07:00:53 -04:00
fix(curriculum): Clarify callback requirement (#55489)
This commit is contained in:
@@ -17,9 +17,9 @@ The `toggle` method will add the class if it is not present on the element, and
|
||||
element.classList.toggle("class-to-toggle");
|
||||
```
|
||||
|
||||
Add an event listener to the `openTaskFormBtn` element and pass in a `click` event for the first argument and an empty callback function for the second argument.
|
||||
Add an event listener to the `openTaskFormBtn` element and pass in a `"click"` event for the first argument and an anonymous callback function for the second argument.
|
||||
|
||||
For the callback function, use the `classList.toggle()` method to toggle the `hidden` class on the `taskForm` element.
|
||||
Inside the callback function, use the `classList.toggle()` method to toggle the `"hidden"` class on the `taskForm` element.
|
||||
|
||||
Now you can `click` on the "Add new Task" button and see the form modal.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user