/ Published in: jQuery

I needed to temporarily unbind jqZoom plugin events from a DOM-element and store them for later use. That's what worked for me. Any comments and suggestions would be much appreciated!
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var zoomEvents = $.extend(true,{},jqzoom.data('events')); //deep copy of an event object jqzoom.trigger('mouseleave'); // this just emulates mouseleave event in order to hide zoom box jqzoom.unbind(); for (i in zoomEvents) { var evt = zoomEvents[i]; for (k in evt) { jqzoom.bind(evt[k].type, evt[k].handler) } }
Comments
