在以下这段代码的基础上增加焦点图每隔3s自动切换
/************** Full Screen Slider *********************/
$(window).resize(function(){
var height = $(window).height();
var width = $(window).width();
$('.swiper-container, .swiper-slide').height(height);
$('.swiper-container, .swiper-slide').width(width);
})
$(window).resize();
$('.arrow-left, .arrow-right').on('click', function() {
$('.slider-caption h2').removeClass('animated fadeInDown');
$('.slider-caption h2').fadeIn(0).addClass('animated fadeInDown');
$('.slider-caption p').removeClass('animated fadeInUp');
$('.slider-caption p').fadeIn(0).addClass('animated fadeInUp');
});
var mySwiper = new Swiper('.swiper-container',{
mode:'horizontal',
loop: true,
keyboardControl: true
})
$('.arrow-left').on('click', function(e){
e.preventDefault()
mySwiper.swipePrev()
})
$('.arrow-right').on('click', function(e){
e.preventDefault()
mySwiper.swipeNext()
})
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
不知道,这样的是不是你想要的: