使用 jquery 动态启动缩放脚本
我不知道如何从 Dynamicdrive 动态启动 jQuery Image Power Zoomer v1.1 脚本。 我需要开始缩放灯箱类型的画廊图像,但是当我通过单击(实时)调用它时,它需要将光标从图片中移出并返回以启动脚本。我的首选方法是简单的 mouseenter 方法,但它似乎与脚本自己的 mouseenter-mouseleave 操作冲突,因此如果有必要,我可以通过单击进行妥协。
示例页面在这里: http://baksagaspar.com/MH-work/collections/jungle-under -construction-2
我使用这个脚本来触发:
jQuery("img#shTopImg").live('click', function() {
jQuery("img#shTopImg").addpowerzoom( { magnifiersize: [200,200] } );
});
请帮忙,我怎样才能动态启动脚本?
I don't know how to dynamically start the jQuery Image Power Zoomer v1.1 script from Dynamicdrive.
I would need to start the zoom on lightbox-type gallery images, but when I call it with click (live) it needs the cursor to be moved out from the picture and back in to get the script started. My preferred method would be the simple mouseenter method, but it seems to be conflicting with the scripts' own mouseenter-mouseleave actions, so I could make the compromise with the click if it's necessary.
The example page is here:
http://baksagaspar.com/MH-work/collections/jungle-under-construction-2
and I use this script for triggering:
jQuery("img#shTopImg").live('click', function() {
jQuery("img#shTopImg").addpowerzoom( { magnifiersize: [200,200] } );
});
Any help please, how could I get the script start dynamically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在页面加载时调用 init 事件:
You need to call init event on page loading: