Fare konumunu sorgulamanın bir yolu olduğuna inanmıyorum , ancak mousemovebilgileri saklayan bir işleyici kullanabilirsiniz , böylece depolanan bilgileri sorgulayabilirsiniz.
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) {
// ....
}
});
AncaksetTimeout kod ve benzeri dışındaki hemen hemen tüm kodlar bir olaya yanıt olarak çalışır ve çoğu olay fare konumunu sağlar. Yani farenin nerede olduğunu bilmesi gereken kodunuz muhtemelen bu bilgilere zaten erişebilir ...