https://magenta-spirit.codio.io/ - 如果删除标签表单,一切正常。但内部表单标签滑块不起作用。控制台是空的。是什么原因? 油滑:
$().ready(function(e) {
$('.calc-photos-slider').slick({
dots: true,
infinite: false,
speed: 500,
fade: false,
slide: 'li',
cssEase: 'linear',
centerMode: true,
slidesToShow: 1,
variableWidth: true,
autoplay: false,
autoplaySpeed: 4000,
responsive: [{
breakpoint: 800,
settings: {
arrows: false,
centerMode: false,
centerPadding: '40px',
variableWidth: false,
slidesToShow: 1,
dots: true
},
breakpoint: 1200,
settings: {
arrows: false,
centerMode: false,
centerPadding: '40px',
variableWidth: false,
slidesToShow: 1,
dots: true
}
}],
customPaging: function(slider, i) {
return '<button class="tab">' + $('.slick-thumbs li:nth-child(' + (i + 1) + ')').html() + '</button>';
}
});
});
答案 0 :(得分:0)
问题已解决,我们只是将左右按钮标签更改为锚定标签并已解决问题。
Just change
return '<button class="tab">' + $('.slick-thumbs li:nth-child(' + (i + 1) + ')').html() + '</button>';
to
return '<a class="tab">' + $('.slick-thumbs li:nth-child(' + (i + 1) + ')').html() + '</a>';
This will work for you
prevArrow: '<button class="slick-prev"></button>',
nextArrow: '<button class="slick-next"></button>',
to
prevArrow: '< a class="slick-prev"> <i class="ion-ios-arrow-back"></i >< /a >',
nextArrow: '<a class="slick-next">< i class="ion-ios-arrow-forward"> </i > </a >',