Skip to content

Just module number 3, another practice set for JS and GSAP, DOM. We have an animation where, moving the mouse in a div or wherever this is applied will make images appear following the mouse cursor

Notifications You must be signed in to change notification settings

knileshh/TrailingImagesAnimation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrailingImagesAnimation

Just module number 3, another practice set for JS and GSAP, DOM. We have an animation where, moving the mouse in a div or wherever this is applied will make images appear following the mouse cursor

Demonstration 🐱.

Demo

LIVE Demo!!

What's happening under the hood.

Demo

  • Here, we are creating and removing classes, with the help of DOM, and JS.

Remember ‼

⚠⚠ if you don't remove the div's, here that is being done in the setTimeout(). Then the cat's might stop to appear since the div's won't be removed and continue to occupy the space. Then you won't have the contact with the rectangle div and thus rendering the logic useless. Meaning you need your cursor to make contact with rectangles div in order to make these images pop-up.

Inspired from Sheriyans Coding School YT

About

Just module number 3, another practice set for JS and GSAP, DOM. We have an animation where, moving the mouse in a div or wherever this is applied will make images appear following the mouse cursor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published