New Dot 1


#1



I'm stuck on Next Dot 1. I even tried copying and pasting the code from the hint, but it still gives me the same errors.


It keeps giving me the "Oops, try again. Remember to remove '.active-dot' from the current dot." error. It also says "Uncaught SyntaxError: Unexpected end of input".


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 Leila,

You need to close your main function with a closing curly brace (}) just before the last line :slight_smile:


#3

It worked! Thanks so much!


#4

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