Lesson 4: Next slide 1 -- code passes but throws error

poll

#1

The following code passes the exercise but with an error saying variables are undefined:

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

$(document).ready(main);

However, this code:

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);

Fails to pass with an error saying:

"Remember to fade out the current slide and remove the 'activeSlide' class."

Can anyone see why this is?


#2

Ok, figured it out. Was just missing the dot before .active-slide in the first line of the $('.arrow-next').click function call.