简体   繁体   English

幻灯片-悬停在缩略图上时暂停显示

[英]Slideshow - Pause show when hovering over thumbnail

The client has requested that when the viewer hovers over the thumbnails the slideshow automatically pauses. 客户要求,当观众将鼠标悬停在缩略图上时,幻灯片放映会自动暂停。 Is this possible? 这可能吗? If so how do you do it as I'm a javascript newbie. 如果是这样,您是怎么做的,因为我是javascript新手。 The slideshow currently pauses when hovering over the main image. 将鼠标悬停在主图像上时,当前幻灯片会暂停。

It's the Nivo slider plugin for Wordpress which I purchased. 这是我购买的用于Wordpress的Nivo滑块插件。

Thanks 谢谢

Paul Day Sculpture 保罗·戴雕塑

$('.nivo-control').hover(function(){
vars.paused = true;
clearInterval(timer);
timer = '';
}, function(){
vars.paused = false;
// Restart the timer
if(timer === '' && !settings.manualAdvance){
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
}
});

Add this code in jquery.nivo.slider.pack.js. 将此代码添加到jquery.nivo.slider.pack.js中。 it will work 它会工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM