Is there a way to dynamically insert a CSS class into the DOM using aurelia.js framework?
If my <th>
element has either the class attribute set as "aut-asc" or "aut-desc", I would like to also add an additional class called: global
The class "aut-asc" is added when it is clicked, but I specifically need the th element with this class to have a red background.
Currently, only the arrow itself has the red background applied.
.aut-desc:before {
content: $fa-var-sort;
background-color: red;
}
If the respective class is not present, no action should be taken.
<thead>
<tr>
<th class="aut-asc">
Sort
</th>
</tr>
</thead>