I have a bxslider and am adding active class to the active slide but i noticed that Active class is being added to the slide after 2-3 seconds delay. Here is my code
jQuery('.banner_slider').bxSlider({
infiniteLoop: true,
hideControlOnEnd: true,
adaptiveHeight : true,
useCSS: false,
speed: 2000,
pause: 8000,
mode: 'fade',
controls:false,
autoDelay: 2800,
onSliderLoad: function(){
jQuery('.banner_slider .slide_banner').eq(0).addClass('active-slide');
jQuery("img.firstanimatedphone").animate({ opacity: 1},2000);
jQuery("img.firstanimatedphone").addClass('slideInRight');
elementsmoving();
},
onSlideAfter: function (currentSlideNumber, totalSlideQty, currentSlideHtmlObject) {
jQuery('.active-slide').removeClass('active-slide');
jQuery('.banner_slider .slide_banner').eq(currentSlideHtmlObject).addClass('active-slide');
jQuery("img.firstanimatedphone").animate({ opacity: 1},2000);
jQuery("img.firstanimatedphone").addClass('slideInRight');
},
auto: false
});
Could you help me to figure out why the class .active-slide is being added after 2-3 seconds delay?
Heey i found.It was from a setting called
speed: 2000,