+ 1
Javascript error in my demo
-Desc: My demo is about a sleeping Owl and if you click on it, its eyes will go from sleep to wake and follow the cursor. -Errors: + Owl Pupil doesn't create and add new global style .wake when clicked + Owl Pupil doesn't follow cursor This is my code link: https://code.sololearn.com/WqCrbpJpWUUV
3 odpowiedzi
+ 1
I would suggest you to already add the .wake style in the css and only add the class to the element when clicking on it.
+ 1
Can you explain me why my pupil doesn't follow to cursor
+ 1
MasterofBegining Change line 50 to:
let mouseOffset = { x: e.clientX, y: e.clientY };