From fe8099725089c82e605609bc17db28962b3f547e Mon Sep 17 00:00:00 2001 From: Marie Malarme Date: Fri, 26 Feb 2021 19:09:39 +0000 Subject: [PATCH] Add instruction in exercise 6 "Bring it to life" --- subjects/bring-it-to-life/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subjects/bring-it-to-life/README.md b/subjects/bring-it-to-life/README.md index 7efaf934..74cf78ca 100644 --- a/subjects/bring-it-to-life/README.md +++ b/subjects/bring-it-to-life/README.md @@ -15,7 +15,7 @@ First, define it in your CSS file: } ``` -In the JS file, add the freshly-created class `eye-closed` to the [`classList`](https://css-tricks.com/snippets/javascript/the-classlist-api/) of your `eye-left` element. +In the JS file, add the freshly-created class `eye-closed` to the [`classList`](https://css-tricks.com/snippets/javascript/the-classlist-api/) of your `eye-left` element, and [set its style property](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles) background color to "black". Reload the page - it's alive! Your JS brain has control and orders your HTML/CSS body to close one eye. @@ -30,3 +30,4 @@ This is what you should see in the browser: - [Link a JS script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) - [`getElementById`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById) - [`classList` / `add()`](https://css-tricks.com/snippets/javascript/the-classlist-api/) +- [Setting style with JS](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)