Prototype.

I would like to know if there is any equivalent of the jquery mousemove function in the prototype.

+4
source share
2 answers

I think this will lead you to where you want to be:

Event.observe(document, 'mousemove', callBackFunction); callbackFunction = function(event) { //do something } 
+4
source

This answer is not prototypejs, but you can always use the DOM API directly to assign a handler.

 document.onmousemove = function() { // do something }; 

You will have good cross-browser support if you do not try to place the event on a window . So use document or some other element.

http://www.quirksmode.org/dom/events/mousemove.html

To remove the handler later, assign null .

 document.onmousemove = null; 
+2
source

All Articles