7. Next dot 2


I'm having trouble with 7. Next Dot 2, I read that 'currenDot.removeClass...' should be below the 'if statement' and I did that but still does not work. Can anyone tell what am I missing?

This is the error message:

When on the last slide, it looks like next arrow isn't wrapping back to the first dot. Look back at the instructions and check the code inside the if statement.

var main = function() {
    $('.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');




Have a close look at

'active -slide'


Oh, you're right. Thank you.


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