I am using jQuery to track the movement of my cursor on screen (Both for X & Y), I am creating a border of 100px by 100px on a div with an id, and I am making the border change position so it can follow the cursor. I know I can change the cursor to an image in CSS, but I believe there are size restrictions on that.
Basically, for the end product, I would like for the cursor to stop moving after a certain point in the window. (for example if you look at the fiddle below, and quickly move your cursor out of the 'result' window, you will see the border box is not at the edge of the window) So I am looking for a way to make this more responsive, and have the box at the edge of the window when scroll out of the window.
The Fiddle below should help you understand what I need help with.
http://jsfiddle.net/tygbkvyr/1/
The JS I am using is as shown.
jQuery(document).on("mousemove", function(event) {
jQuery('#theImage').css({left: event.pageX, top: event.pageY});
});
Thank you for all the help