Remember to add '.active-dot' to the next dot


#1



My code doesn´t work, it gives the error out of the topic name. Even when i copy the code out of the hint section it doesn´t seem to work. Can anyone help me out??
My code:


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

your code is fine
try after refresh your browser :slight_smile:


#3

seems to work now.. but there is still something wrong with my code that the editor didnt see at first but as i progress it seems to not work. :confounded:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.