When Im at the top of the page. The curose_div will follow the cursor perfectly. But when I start scrolling to the bottom the cursor_div position will not follow correctly.
Heres my code
<div id="cursor"</div></div id="cursor_border"></div>
`var cursor = $('#cursor'); var cursor_border = $('#cursor_border');
$(document).mousemove(function(e){
console.log(e.pageY + ' and '+ e.pageX ) ;
var x = e.pageX;
var y = e.pageY;
cursor.css("left",x+'px');
cursor.css("top",y+'px');
cursor_border.css("left",x+'px');
cursor_border.css("top",y+'px');`
Use
event.clientXandevent.clientYtogether with#cursor { position: fixed; }: