how can i limit the mousemove event to a certain area, let's say a div in the middle of the page? Thanks in advance
if (window.screen.width > 765)
if (matchMedia('(pointer:fine)').matches)
$(document).ready(function() {
$(this).on("mousemove", function(e) {
var x = e.pageX;
var y = e.pageY;
var el = $(".title");
el.css('position', 'absolute');
el.css("left", x);
el.css("top", y);
})
})