@Rexer-Glitch
Posted
There shouldn't be any difference between the 2 approaches. Though I would prefer using classes to change styles since this obeys the separation of concerns - Javascript should be only for logic, not for applying styles. It's a better approach in my experience.
Marked as helpful