JavaScript Library To Track Mouse Position Relative To Element – spot.js

Category: Javascript , Recommended | May 4, 2016
Author:brainlessdeveloper
Views Total:710 views
Official Page:Go to website
Last Update:May 4, 2016
License:MIT

Preview:

JavaScript Library To Track Mouse Position Relative To Element – spot.js

Description:

spot.js a lightweight JavaScript library that tracks your mouse position and adds the corresponding effects to target element.

How to use it:

Just download and include the spot.js script in the html document and we’re ready to go.

<script src="spot.js"></script>

Add the following CSS classes to your element.

  • spot-shadow: create dynamic shadows relative to the mouse position.
  • spot-rotate: rotate an element to face wherever the mouse is.
  • spot-area: restrict where spot.js will listen to mouse move events.

You Might Be Interested In:


Leave a Reply