What's wrong with this code?


#1



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


Trying out this "Make an Interactive Website: Flipboard" exercise and did exactly what the instructions are telling me to do. I was wondering why I am still getting this error message.
"Oops, try again. Remember to fade out the current slide and remove the 'activeSlide' class."

Any help to solve this problem would be appreciated. Thanks.

var main = function() {
    $('.dropdown-toggle').click(function() {
       $('.dropdown-menu').toggle(); 
    });
    
    $('.arrow-next').click(function() {
       var currentSlide = $('.active.slide');
       var nextSlide = currentSlide.next();
       
       currentSlide.fadeOut(600).removeClass('active-slide');
       nextSlide.fadeIn(600).addClass('active-slide');
    });
};


$(document).ready(main);


#2

should be '.active-slide'.


#3

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.