7. Next Dot 2 not working for me please help


#1

I can't seem to find the problem in my code.
Here it is please try and help me find the issue.

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();
nextDot = $('.dot').first();
}
currentSlide.fadeOut(600).removeClass('active-slide');
nextSlide.fadeIn(600).addClass('active-slide');
var currentDot = $('.active-dot');
var nextDot = currentDot.next();
currentDot.removeClass('active-dot');
nextDot.addClass('active-dot');
});
};
$(document).ready(main);


#2

Hi Al700563,

Try removing those two lines (the second time they show up).


#3

Thank you very much I honestly don't know how I missed this!
I appreciate the support this really helped!