Javascript 如何禁用swiper“下一步”按钮
我正在使用。现在我想用它来做向导。我已将表单分为多个步骤。正因为如此,只有在您拥有有效表单的情况下,才应该启用“下一步”按钮。我在文档中找不到如何做到这一点。我当前的swiper配置如下所示Javascript 如何禁用swiper“下一步”按钮,javascript,swiper,Javascript,Swiper,我正在使用。现在我想用它来做向导。我已将表单分为多个步骤。正因为如此,只有在您拥有有效表单的情况下,才应该启用“下一步”按钮。我在文档中找不到如何做到这一点。我当前的swiper配置如下所示 var mySwiper = new Swiper ('.swiper-container', { // Optional parameters direction: 'horizontal', loop: false, // Navigation arrows n
var mySwiper = new Swiper ('.swiper-container', {
// Optional parameters
direction: 'horizontal',
loop: false,
// Navigation arrows
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
// And if we need scrollbar
scrollbar: '.swiper-scrollbar',
allowSwipeToPrev: false,
allowSwipeToNext: false,
});
有关于如何启用/禁用下一步按钮的建议吗?将
swiper button disabled
类添加到.swiper button next
元素中。谢谢,这很有效!!将swiper button disabled
类添加到.swiper button next
元素中。谢谢,可以使用!!