Why am I being told "Remember to fade out the current slide"?


#1

getting same error message. i added the necessary brackets too. Any insight will be appreciated

(".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();
      
      
       if (prevSlide.length== 0) {
           prevSlide = $('.slide').last();
       });
    
       
     currentSlide.fadeOut(600).removeClass('active-slide');
     prevSlide.fadeIn(600).addClass('active-slide');
     
   });

};
$(document).ready(main);


"remember to fade out current slide" error - what's wrong here?
#2

Is the slide working?


#3

i have tried using the slide and receive no response. I’m sure i followed the code perfectly.


#4

i get the error message “Uncaught SyntaxError: Unexpected token )”. Where is the error that this message is referring to?


#5

Here is the code for the arrow-prev event handler:

('.arrow-prev').click(function() { var currentSlide = (’.active-slide’);
var prevSlide = currentSlide.prev();

       if (prevSlide.length == 0) {
           prevSlide = $('.slide').last();
       }
       
       currentSlide.fadeOut(600).removeClass('active-slide');
       prevSlide.fadeIn(600).addClass('active-slide');
   });

};
$(document).ready(main);