Forums

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

Home Forums Design How can I express multiple CSS classes in the same div? Reply To: How can I express multiple CSS classes in the same div?

#277029
WayneKenney
Participant

Perhaps mixing CSS with JQuery may help with switching between states.


if (state == 0) { // default state $(`.class`).css(`color`, `white`); // DEFAULT } else if (state == 1) { // completed state (`.class`).css(`color`, `green`); // COMPLETED } else if (state == 2) { // cancelled state (`.class`).css(`color`, `orange`); // CANCELLED } else if (state == 3) { // closed state (`.class`).css(`color`, `red`); // CLOSED }