I tried to add a tracker variable and I am happy with results. It didn't break code, and it does similar to what I was doing before. However my code is adding the active class on the third clicked card when it only should be adding it to the first two. I know it's because I need another condition in my if statement on line 9 but I'm having issues with that part.
@Robin
In the example you provided reset made the cards have no classes and then you were able to ask if(the card had no classes){do this} but my cards have a class called color, and that color class defines the divs so they are visible, so I don't want to remove that class. I'm sure this is simple but how do you check for if (a class the class .color ONLY and not other classes && tracker var){do this} ...?
My repo link is https://github.com/SuperJones/project1 and my question is about line 9 in particular.
I tried to add a tracker variable and I am happy with results. It didn't break code, and it does similar to what I was doing before. However my code is adding the active class on the third clicked card when it only should be adding it to the first two. I know it's because I need another condition in my if statement on line 9 but I'm having issues with that part. @Robin In the example you provided reset made the cards have no classes and then you were able to ask if(the card had no classes){do this} but my cards have a class called color, and that color class defines the divs so they are visible, so I don't want to remove that class. I'm sure this is simple but how do you check for if (a class the class .color ONLY and not other classes && tracker var){do this} ...? My repo link is https://github.com/SuperJones/project1 and my question is about line 9 in particular.