Friday, 15 April 2011

jQuery elevateZoom, how to close the lens when the mouse reaches the corner -



jQuery elevateZoom, how to close the lens when the mouse reaches the corner -

so, have image, can zoomed using elevatezoom (jquery plugin). nearby image there several links.

when user zooming image, , moves corner of image click 1 of links, unable it. in fact, when mouse pointer outside image, lens still active, , (although links visible) not allow user click links (because links above lens, of course).

here practical example: http://jsfiddle.net/18mubj8f/

i wonder if there jquery-ish way, that, when mouse reaches corner, lens close automatically.

of course of study triyng it, finding weird behaviour:

if allow jquery compute outerheight, lens automatically closes when mousepointer goes out image (so mouse reaches corner of #zoom_me image): http://jsfiddle.net/dhhf3ob3/1/ if not compute quantiy, lens not closes when mouse reaches corner of image: http://jsfiddle.net/dhhf3ob3/2/

the outerheight() behaviour affects firefox (i have tried in 31.1.0).

i have solved attaching event mouseevent on zoomlens div.

noteworthy, can't phone call parent.css('display','none') when mouse pointer reaches corner. had phone call within callback in settimeout. here working solution: http://jsfiddle.net/hxqrjl45/

jquery

No comments:

Post a Comment