Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Dumbfounded by THIS Reply To: Dumbfounded by THIS

#148961
TheDoc
Member

Doesn’t $(this) reference $('.color')?

Not really the way you’re thinking it does.

In this case, $(this) refers to the element with a class of color that has been clicked, not all elements with the class of color like saying $('.color') means.