Javascript, GWT
I have a hidden component that will be shown only if a mou开发者_运维问答se pointer is in some area (not necessary on top of the hidden component). Therefore, I am interested in catching all mouse move event from the browser. Is it posible with GWT, GXT, or with Javascript?
Thanks
Yes it is possible to detect mouse events.
For example if you are using jQuery:
$(document).mousemove(function(event){
var mouseX = event.clientX;
var mouseY = event.clientY;
//do something with the X and Y values
});
Demo: http://jsfiddle.net/maniator/xqULX/
精彩评论