11. Previous dot 2 (Works properly at first...)



I was getting a "remember to remove active-slide" error message until just now when it passed me... But my site is still buggy. My next arrow click works once properly, but then the same Anderson Cooper background keeps reappearing. My previous arrow works for three clicks, until the Anderson Cooper background keeps reappearing. I like him and all but not that much...

var main = 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');
        var currentSlide = $('.active-slide');
        var prevSlide = currentSlide.prev();
        var currentDot = $('.active-dot');
        var prevDot = currentDot.prev();
        if(prevSlide.length === 0) {
            prevSlide = $('.slide').last(); 
            prevDot = $('.dot').last();

        currentSlide.fadeOut(600).removeClass('active              -slide');



Remove the extra space's

'active              -slide'

to get



Well that probably seems like it should have been obvious, but on my screen it wrapped so it didn't look any different than if it had been right and I didn't look that closely at my pasted code. :slight_smile: So thank you for your fresh set of eyes.


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