簡體   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