Is there a Bug Interactive website Course? Error Remember to remove '.active-dot' from the current dot.Problem Unit 5 11/12 but the code is running right when i run it on browser


#1

hi guys i'm almost complete with this course in interactive website however i always have a feeling that there is a bug in the course, i managed to run this code below on the browser and it is running alright can someone look at the code for me can you agree with me that there is nothing wrong with the code? I debug it many times and it should be running alright please help thank you very much!

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();
    } // <- this curly brace is what you seem to be missing

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

    currentDot.removeClass('active-dot');
    nextDot.addClass('active-dot');
}); // you forgot ); on this line

$('.arrow-prev').click(function() 
{
  
    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');
    prevSlide.fadeIn(600).addClass('active-slide');
    
    currentDot.removeClass('active-dot');
	prevDot.addClass('active-dot');
});

}

$(document).ready(main);


#2

I tried your code in a windows 8.1 IE11 environment and got a pass...
Maybe...
++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#3

I made it pass at the last exercise of the course at 12/12 bypassing 11/12 cause i can't pass it.I finish creating previous dot and it is working alright but i'm still getting an error that said Remember to remove '.active-dot' from the current dot. I did all your suggestion but does not work, i this is definitely a bug.


#4

Bug confirmed. Same exact issue. I ran my code through several syntax checkers and they all came back clean.

Tried refreshing, new tab, reset code etc. Skipping to 12/12.


#5

Disregard my previous comment. I copy pasted the code from this post and it worked: https://www.codecademy.com/en-US/forum_questions/54d1aa8f9113cb0d3d00137b

Can't say this is the first time this has happened. No matter how diligent I am, after hours of looking, I can't find a difference between my code and the hint. But when I copy paste it, it goes through.

Not sure if that means there's a bug or if the system is just very strict, even thrown off by spacing.