fix(curriculum): Clarify callback requirement (#55489)

This commit is contained in:
Farid Zouheir
2024-07-12 00:39:37 +01:00
committed by GitHub
parent 4547b8d1f9
commit 9158fcdd84

View File

@@ -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.