1) $() function is actually a factory for jQuery object. It is the object encapsulates zero or more DOM dlements. 2) .addClass() and .removeClass() They are fairly self-explanatory. Its only parameter is the name of the class to add or remove. Here are two samples.