gpt4 book ai didi

javascript - 页面加载后没有自动播放(Twitter Bootstrap 轮播)

转载 作者:行者123 更新时间:2023-11-30 18:09:35 24 4
gpt4 key购买 nike

我的 slider 在页面加载后没有自动播放。如果我右键单击,则会打开自动播放。怎么了?

$('#myCarousel').on('slid', '', function() {
var $this = $(this);

$this.children('.carousel-control').show();
if($('.carousel-inner .item:first').hasClass('active')) {
$this.children('.left.carousel-control').hide();
}
else if($('.carousel-inner .item:last').hasClass('active')) {
$this.children('.right.carousel-control').hide();
}

}).trigger('slid');

最佳答案

把间隔调到最低

 // invoke the carousel
$('#myCarousel').carousel({
interval: 2000
});

关于javascript - 页面加载后没有自动播放(Twitter Bootstrap 轮播),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14938293/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com