These eyes will follow your cursor
For this exercise I used vanilla JS to make two eyeballs follow the cursor. First, I utilized the getElementsByClassName()
function (elements, not element) to select both eyes. I then used the onmousemove
function to calculate the x and y coordinates of the mouse as it moves across the browser. Next with some clever math and a for loop for assignment, I move the eye balls using CSS transforms.