I want to call javascript function in 'th:if'. This is my code.
<li th:each="dto, stat : ${list}" th:if="${stat.count>10}">
<span th:if="'javascript:isNew('+${dto.regDts}+');'">blah blah</span>
</li>
...
<script th:inline="javascript">
function isNew(date) {
if (...) {
return true;
}
return false;
}
</script>
but it doesn't call isNew().
so when I wrote like this...
<span th:if="isNew(${dto.regDts});">blah blah</span>
i got an error.
how can I call javascript function in "th:if"?