Closed ghost closed 9 years ago
toggleClass
expects a string. For example:
$("#whatever").toggleClass("myClassName");
cardColor
is a function that doesn't return anything. As a result, I'm not entirely sure what toggleClass
is trying to do with it!
okay, that's where i'm hung up. going to try to come up with a meaningful cardColor function.
Working on populating the colors for cards in concentration.
I am trying laying colors out manually behind the white squares so each square will toggle to its color when clicked.
Trying:
I expected the colors to populate into all sixteen squares; I'll work on starting out white as a next step.
Instead, the colors do populate, but the clicked square disappears; my toggle method is removing classes instead of toggling between two of them..