Hi,
I would like to know if there is any equivalent to the jquery mousemove function in prototype.
Thanks !
Hi,
I would like to know if there is any equivalent to the jquery mousemove function in prototype.
Thanks !
This answer isn't prototypejs, but you could always use the DOM API directly to assign the handler.
document.onmousemove = function() {
// do something
};
You will have good cross-browser support unless you try to place the event on window
. So use document
or some other element instead.
http://www.quirksmode.org/dom/events/mousemove.html
To remove the handler later, assign null
.
document.onmousemove = null;
I think this will get you where you want to be:
Event.observe(document, 'mousemove', callBackFunction);
callbackFunction = function(event)
{
//do something
}