jQuery question


#1

Hello everybody! Just a quick question regarding jQuery syntax.

Why functions addClass and removeClass have an argument without a dot within parenthases?

For example: currentArticle.removeClass('current');


#3

I would assume it's because the dot is implicit. Since you've called 'removeClass,' which can only be called on a class, you don't need the dot to specify again that it's a class. It just makes things a little bit quicker. Hope that helps :).


#4

That makes sense, thanks. :smile: