$(document).mousemove(function (event) { $('.torch').css({ 'top': event.pageY, 'left': event.pageX }); }); // CHECKS IF USER IS ON MOBILE if (screen.width <= 480) { location.href = '/404/alternate'; }