How set a table row's attribute class dynamically with clojure/enlive?
-
12-01-2021 - |
Frage
I have created a table using enlive template engine. what I have done, is create a singe table row and repeated that row up to the no of row needed dynamically. But, I have some problems update the each row's attribute class
.
How can I set the class
attribute for every table row dynamically, say even odd manner?
Lösung
There is a thread on the enlive mailing list where Christophe Grand explains how to do this.
I also share the feeling that if you can use nth-child selector it is way cleaner.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow