form the above course , why is it that in $('.article').click(function(){
there is a dot symbol (.) in the parentheses with current class
but in $(document).keypress(function(event){
else if(event.which === 110){

this is no dot symbol (.) infront of the class name current??


Hi Owusua,

addClass(), removeClass(), and toggleClass() never take a dot (.) before the class name. The reason for that is because the dot separates a class selector from an id or tag selectors (take the HTML & CSS course for more on those). With add/remove/toggleClass() though, the computer knows it's getting a class as an input, so the dot isn't needed.

Does that help you? :)


yeah but why does it show in the first instance


I'm not sure. It shouldn't. Would you mind posting a link to the exercise you're on?



The code there is based off of your code from the previous exercises. So if it has addClass('.current');, it's probably because that's what you typed in an earlier exercise.


okay, thank you for your help