开发者

removing gallery zoom

开发者 https://www.devze.com 2023-02-15 06:28 出处:网络
I have a gallery with a shutter (lightbox) effect in which on hover a zoom overlay opens (with the full-size image). I use wordpress, jQuery, next-gen gallery, and featuredimagezoomer.js.

I have a gallery with a shutter (lightbox) effect in which on hover a zoom overlay opens (with the full-size image). I use wordpress, jQuery, next-gen gallery, and featuredimagezoomer.js.

The problem with the script is that it doesn't remove the zoom image overlay when I mouseout. I tried the empty(), and remove() methods in jQuery, but none worked well.

this is the script:

jQuery("img#shTopImg").live('mouseover mouseout', function(event) {

  if (event.type == 'mouseover') {
var imw = jQuery("img#shTopImg").width();
jQuery(this).delay(200).addimagezoom({
magnifiersize:[350, 350], zoomrange: [3, 8], rightoffset: - imw });
  } else {

// remove logic goes he开发者_C百科re

}

}); 

and this is the page where it is: http://baksagaspar.com/MH-work/collections/jungle-under-construction-2

You can see when it opens an image in a lightbox, and you navigate to some other picture, it's zoom overlay still stays on the screen

Any help please how could I solve this problem??


You shouldn't bind the mouseover/mouseout to activate the plugin because the plugin does it already. Simply do something like this :

$("img#shTopImg").addimagezoom({
    magnifiersize:[350, 350],
    zommrange: [3, 8]
});
0

精彩评论

暂无评论...
验证码 换一张
取 消