Browse Source

action-reaction: fix typo in instruction

content-update
Marie Malarme 3 years ago committed by Clément
parent
commit
97ac8797d6
  1. 2
      subjects/action-reaction/README.md

2
subjects/action-reaction/README.md

@ -25,7 +25,7 @@ button {
In the JS file, get the HTML button element with [`querySelector`](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector), and [add an event listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) on [`click` event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#javascript), triggering a function that will:
- change the [text content](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) of the button: if the eye is open, write "Click to close the left eye", if the eye is closed, write "Click to open the left eye"
- [toggle](https://css-tricks.com/snippets/javascript/the-classlist-api/) the class `eye-open` in the `classList` of the `eye-left` HTML element
- [toggle](https://css-tricks.com/snippets/javascript/the-classlist-api/) the class `eye-closed` in the `classList` of the `eye-left` HTML element
- change the background color of the `eye-left`: if the eye is open, to "red", if the eye is closed, to "black"
### Expected output

Loading…
Cancel
Save