'next dot 1'


#1



I seem to be following the order and syntax of successful examples, but still getting an error message. Many thanks to anyone that can shine a light on whatever I'm missing!


error message--> “Oops, try again. Remember to remove '.active-dot' from the current dot.”


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

        currentSlide.fadeOut(600).removeClass('active-slide');
        nextSlide.fadeIn(600).addClass('active-slide');
        
        currentDot.removeClass('active-dot');
        nextDot.addClass('active-dot');
    });

$(document).ready(main);


#2

HI you didn't close the main funcion

var main = function() {
    ....
}; <-- #it's missing that one

#3

OMG I don't know how I missed something so simple. Thanks for lending a sharp eye, wizmarco!