MooTools mouse position

Add an event to an element. Every time this event is triggered, you'll be able to get the mouse position at this exact moment.

$(document.body).addEvent(mousemove,function(event){
var mouseX = event.page.x;
var mouseY = event.page.y;
});

CSS

html,body{width:100%;height:100%}