Cursor Position Tracker jQuery - Download Cursor Position Tracker For jQuery - Cursor Tracker

Download Cursor Position Tracker For jQuery – Cursor Tracker

Posted on

This time I will share jQuery Plugin and tutorial about Cursor Position Tracker For jQuery – Cursor Tracker, hope it will help you in programming stack.

Cursor Position Tracker jQuery - Download Cursor Position Tracker For jQuery - Cursor Tracker

File Size: 4.66 KB
Views Total: 1123
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A Cursor Tracker built using jQuery that keeps track of the current cursor position and angle on mouse move.

How to use it:

1. Include both jQuery library and the Cursor Tracker’s script ‘cursor-tracker.js’ at the bottom of the webpage.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="cursor-tracker.js"></script>

2. Call the function on the target container where you want to track the cursor position.

1 $(".element").cursor("mousemove", function(values) {
2   ...
3 });

3. Available attributes:

01 $(".element").cursor("mousemove", function(values) {
02  
03   // cursor position in relation to the center of the element
04   values.xAxisCentered
05   values.yAxisCentered
06  
07   // cursor position in relation to the top left of the element
08   values.xAxisCentered
09   values.yAxis
10  
11   // degress in relation to the center of the element
12   values.angle
13  
14   // corner of the element
15   values.corner
16    
17 });

Change log:

2017-10-10


This awesome jQuery plugin is developed by tomislavjezidzic. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net