setInterval(function(){ jQuery('span.swiper-pagination-bullet').removeClass('prev_slide'); jQuery('span.swiper-pagination-bullet').removeClass('next_slide'); var previous = jQuery('span.swiper-pagination-bullet.swiper-pagination-bullet-active').prev(); if(previous.length == 0){ previous = jQuery('.swiper-pagination-clickable.swiper-pagination-bullets .swiper-pagination-bullet').last(); } previous.addClass('prev_slide'); var next = jQuery('span.swiper-pagination-bullet.swiper-pagination-bullet-active').next(); if(next.length == 0){ next = jQuery('.swiper-pagination-clickable.swiper-pagination-bullets .swiper-pagination-bullet').first(); } next.addClass('next_slide'); }, 1500); //OR setInterval(function(){ jQuery('span.swiper-pagination-bullet').removeClass('prev_slide'); jQuery('span.swiper-pagination-bullet').removeClass('next_slide'); jQuery('span.swiper-pagination-bullet.swiper-pagination-bullet-active').prev().addClass('prev_slide'); jQuery('span.swiper-pagination-bullet.swiper-pagination-bullet-active').next().addClass('next_slide'); }, 2500);
Jagdish Sarma Asked question October 11, 2020