jQuery(function($) {
var currentMousePos = { x: -1, y: -1 };
$(document).mousemove(function(event) {
currentMousePos.x = event.pageX;
currentMousePos.y = event.pageY;
});
// ELSEWHERE, your code that needs to know the mouse position without an event
if (currentMousePos.x < 10) {
// ....
}
});