Lab
Shake, Rattle and RollIntroduction
One of the most common things to do with JavaScript is HTML Manipulation or changing HTML after it has been loaded.
Objective
In this lab, you will use what you have learned about JavaScript variables and HTML Manipulation to make the box Shake, Rattle, and Roll.
Requirements
Follow the requirements below to successfully complete the assignment.
- Download the Shake, Rattle and Roll starter files. Inside the zip file you will find the following files:
index.html
,style.css
andindex.js
. All of the changes will be made to theindex.js
file. Do NOT change theindex.html
orstyle.css
files. - Retrieve the first box by using its
id
. - Add the classes
shake
,animated
, andinfinite
to the first box. - Add the text "Shake" to the first box.
- Retrieve the second box by using the class
rattle
. - Remove the class
rattle
from the second box. - Add the class
wobble
to the second box. - Update the text of the second box to "Wobble".
- Retrieve the third box (NOTE: You will not be able to use a class).
- Add the class
rollIn
to the third box. - Add the text "Roll" to the third box.
- Retrieve the four box using the
data-animation
attribute. - Add a class to the four box with the same value as the
data-animation
attribute. Do NOT "hard code" the string. - Retrieve the five box, then choose your own animation and make the box animate forever (See Animate.css).
- Once completed, submit the
index.js
file to Shake, Rattle and Roll assignment on Brightspace.