How to Set-Up

First copy the link element found below,

Then paste it in your script src attribute.(above the place you want to use the library)

https://amieldev.github.io/libs/gravity/gravity.js



How to use

After pasting the link given above,you are ready to use the library.

To add gravity to your html elements all you have to do is call the gravity() function in your java-script code and pass your element's name,class or id.

The the gravity function will make any element with the same name,class or id with the one you give will start falling to the bottom of the screen.

Example:


Html

Css

Java-script

Result:

©Amiel-Sintayehu(Ami-Dev)