Why removeClass('current') not removeClass('.current')?


Hey guys, I have a technical question that I'm getting myself confused on. I'm on exercise 9 (The N Shortcut 2) and I got confused on why $('.current') uses a dot in the beginning and removeClass('.current') doesn't. Can anyone explain this?

else if (event.which === 110) {
            var currentArticle = $('.current');
            var nextArticle = currentArticle.next();



Hi Ivanakbar,

This FAQ post should explain that for you :slight_smile:

Let me know if you still have questions!


I have the same code, but they said: "Oops, try again. Make sure you have defined all the variables!" why? Can anybody explain it? Thanks


Hi Ivanakbar,

This FAQ post should answer your question :slight_smile:

- [FAQ] Common Problems for “Make an Interactive Website: News Reader”