Is there any way to retrieve the current mouse move handler for a selection in jQuery?
The normal method, as per standard jQuery, would be to simply call $('selector').mousemove(), but I see that for the events this simulates the event instead of returning the handler.
Is this possible?
I think what you are after are the mousemove handlers attached to an element, in that case you can use a non-documented method jQuery._data() like
var handlers = $._data($('div')[0], 'events').mousemove;
here handlers will be an array of objects where each object refer to a handler for mousemove event. from the object you can get the handler method using the handler property.
Demo: Fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With