Error message showing for Previous slide 1


#1



https://www.codecademy.com/courses/web-beginner-en-seyrq/0/8?content_from=make-an-interactive-website%3Ajquery-effects#

Hi! I keep getting the error message "Oops, try again. It looks like previous arrow isn't moving back to the previous slide. Look back at the instructions and check the $('.arrow-prev').click() event handler" when I try to save and submit my code but the code itself actually seems to work, the previous slide does show up when I press the arrow. Is there something wrong with my code or is there a bug in the system?

var main = function() {
    $('.dropdown-toggle').click(function() {
        $('.dropdown-menu').toggle();
    });
    
    $('.arrow-next').click(function() {
     var currentSlide = $('.active-slide');
     var nextSlide = currentSlide.next();
    var currentDot = $('.active-dot');
    var nextDot = currentDot.next();
     
      if(nextSlide.length == 0) {
        nextSlide = $('.slide').first();
        nextDot = $('.dot').first();
    }
     
     currentSlide.fadeOut(600).removeClass('active-slide');
     nextSlide.fadeIn(600).addClass('active-slide');
    
    currentDot.removeClass('active-dot');
    nextDot.addClass('active-dot');
    
    });
    
    $('.arrow-prev').click(function() {
      var currentSlide = $('.active-slide');
      var prevSlide = currentSlide.prev();
      
     currentSlide.fadeOut(600).removeClass('active-Slide');
     prevSlide.fadeIn(600).addClass('active-Slide');
      
    });
    
};

$(document).ready(main);


#2

@huneeya

Have a close look at

'active-Slide'