#11, I'm getting the same error as everyone else: "remove '.active-dot' from the current dot"


#1

Hey,
Here is my piece of code..but i still get the error that everybody has been facing " Oops, try again. Remember to remove '.active-dot' from the current dot."

Please review my code and help me know where have i made the mistake.

Thanking in anticipation.

Code begins below:
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');

    currentDot.removeClass('active-dot');
    nextDot.addClass('active-dot');


});

$('.arrow-prev').click(function()
{
    var currentSlide=$('.active-slide')
    var prevSlide=currentSlide.prev();

    var currentDot=$('.ative-dot');
    var prevDot= currentDot.prev();

    if(prevSlide.length==0)
    {
        prevSlide=$('.slide').last();
        prevDot=$('.dot').last();
    }
    currentSlide.fadeOut(600).removeClass('active-slide');
    prevSlide.fadeIn(600).addClass('active-slide');


    currentDot.removeClass('active-dot');
    prevDot.addClass('active-dot');

});

};

$(document).ready(main);


#2

@shreyasb07,

Have a close look at

ative-dot'