I want to add a dynamic classname which will come from javascript based on some check. But one class navigate-forward is there which is also displayed based on some check. How to combine both?
Following is my code -
<span class="menu-item" data-bind="text: data.description,
css: {
'navigate-forward': !child.action,
child.className //I tried something like this which doesn't work
}"></span>
child.className will have a value based on some check in javascript code. And whatever value it gives I want to add that class to this span.
Ex. if child.className is tooltip then that class should be added to the span.
output
<span class="menu-item navigate-forward tooltip">Menu item</span>