繁体   English   中英

猫头鹰传送带2-悬停时无法更改幻灯片

[英]Owl Carousel 2 - can't change slide on hover

我已经尝试过交换owl.carousel.js上的功能,但是它仅在鼠标移动时才起作用。

var Autoplay = function(scope) {
this.core = scope;
this.core.options = $.extend({}, Autoplay.Defaults, this.core.options);

this.handlers = {
    'translated.owl.carousel refreshed.owl.carousel': $.proxy(function() {
        this.autoplay();
    }, this),
    'play.owl.autoplay': $.proxy(function(e, t, s) {
        this.play(t, s);
    }, this),
    'stop.owl.autoplay': $.proxy(function() {
        this.stop();
    }, this),
    'mouseover.owl.autoplay': $.proxy(function() {
        if (this.core.settings.autoplayHoverPause) {
            this.pause();
        }
    }, this),
    'mouseleave.owl.autoplay': $.proxy(function() {
        if (this.core.settings.autoplayHoverPause) {
            this.autoplay();
        }
    }, this)
};

this.core.$element.on(this.handlers);};

知道如何在将鼠标放在图像上方时使幻灯片放映吗?

当我遇到这个问题时,我使用了以下代码:

$('。owl-carousel .owl-dot')。hover(function(){
$(this).click();
},
function(){}
);

这是我的CSS的点:
.owl-dot {
职位:相对
填充:0;
高度:3px;
边距:0;
向左飘浮;
}
.owl-dot:before {
内容:“”;
位置:绝对;
顶部:-168px;
//图片高度:168px;
//图片高度的宽度:100%;
左:0;
z索引:0;
}

当您将鼠标悬停在点上时,图像将发生变化,仅此而已!!!

暂无
暂无

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

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