Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;( function( $ ) {
var mouse = {
x: 0, // Current x-axis position of mouse
y: 0 // Current y-axis position of mouse
};
$( document ).on( 'mousemove', function( event ) {
mouse.x = event.clientX || event.pageX;
mouse.y = event.clientY || event.pageY;
} );
} ) ( jQuery )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.