Is there a way to tell Thymeleaf to add parameters to a tag instead of overriding them?
Example:
<div class="a" th:class=${x ? 'b' : 'c'}>
Should result in either
<div class="a b">
or
<div class="a c">
Regards
Another way to do this would be
th:attr="class=|a ${x ? 'b' : 'c'}|"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With