Error Next Dot 1


#1

Sorry! Many threads like this but I have not found the answer :confounded:

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) {
            $('.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

@systemrockstar74885,
You are forgetting to close the =main= function with its closing curly-bracket-}

The structure of the =main= function should look like

var main = function() {
     //Begin of =main= FUNCTION-BODY
        $('.dropdown-toggle').click(function(){
              $('.dropdown-menu').toggle();
        });

        $('.arrow-next').click( function() {
             //code which gets executed when =click=ed
        });
     //End of =main= FUNCTION-BODY
};

//And the =main= function should be executed when the document is fully loaded and READY

$(document).ready( main );