Autoplay JQuery slideshow Using cbpFWSlider

前端 未结 5 1065
一向
一向 2020-12-21 07:12

I\'m using cbpFWSlider and it doesn\'t appear to include an option for autoplay. I\'m pretty new to Jquery and have Googled to high heaven but have yet to find a solution. i

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-21 07:52

    $('document').ready(function(){
    $('#cbp-fwslider').cbpFWSlider();
    setInterval( function(){
        if($('.cbp-fwdots').find('span:last').hasClass('cbp-fwcurrent')){
            $('.cbp-fwdots').find('span:first-child').click();
        }else{ $('.cbp-fwnext').click();}} ,3000 );});
    

    for return to first span (span:first-child) bucle infinite

提交回复
热议问题