zoomy-plugin
zoomy-plugin copied to clipboard
Start on hover
I'm trying to amend the plugin to work on hover rather than having to click first (a previous click action expands the image area, so I don't want a further click action to enable zoomy)
I've changed most 'click' references to 'mousemove' or 'mouseover' but none seem to trigger zoomy showing until my mouse leaves the image and then re-enters. I'm trying to trigger that same re-enter action without having to leave the image boundaries first (I thought 'mousemove' would accomplish this).
Also what's the best way to "destroy" zoomy, when I click a close button I want to remove clicky from that image so it can be resized and moved out of the way.
I've just noticed you have an event function for that, whoops!
.zoomy('mouseover', {});
However this still does not trigger the magnification if the mouse starts over the image when zoomy is initialised. You still have to move your mouse outside of the image and then back in to start it.
Ahh I see yeah Ill have to see, zoomys initially was setup to work on mouseover
, it must have been messed up when fixing some image loading issues. Might need add in a conditional to start the zoom inside of that event handler for the loading.
OK great, and what would you recommend for removing zoomy from an element?
ok now i remember, i just pull events off of the elements before image was loaded, it was causing all kinds of issues because things were not initialized at that time, ill have to look into attaching an event before then un binding once everything is there.
oh and to kill zoomy https://gist.github.com/jacoblwe20/1365874
OK great looking forward to that. Thanks for the kill function!