我在这里感觉非常愚蠢 - 我无法在jQuery中使用简单的类切换语句!我只能坐在最后45分钟的挫折中,我搜索了Stack Overflow的问题和答案,但无济于事.
My goal is, upon clicking an item with the colorClick id (already containing a default class of "white"), to rotate that item between being assigned the class green, yellow, orange, red, and back to white again (ad infinitum).
The CSS is simple - each class simply corresponds to a different background color.
The HTML is simple - a div tag with two CSS classes (one static, one to be changed by jQuery).
The jQuery is simple …