Code is correct but effects fail in the webpage


#1

My code is correct and the course is moving me forward, indicating that I have done it correctly, but the slides won’t advance on the Flipboard webpage. I get the error

Object doesn’t support property or method ‘next’/’‘prev’

Could I be doing something wrong that is getting past the check?

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

};

$(document).ready(main);


#2

@chrsbrnd,
If you want to create a jQuery-Selection you use $()
######Have a close look at
#(’.active-slide’)