Commit after each question.
-
Link to
script.js
inindex.html
-
View comments in
script.js
for the rest of this section's questions.
-
In
index.html
, link to a jQuery CDN. -
Link to
stoplight.js
inindex.html
-
Create an event listener(s) so that when you click on a light, it turns to its respective color (i.e., top light turns red).
-
If you click a light that is already on, it turns off.
-
If you click yellow, it switches to red after two seconds.
-
Make it so that only one light can be turned on at a time (e.g., both red and yellow cannot be on at the same time).