title: KnockoutJS add static and dynamic class name using css property
body: <p>I want to add a dynamic classname which will come from javascript based on some check. But one class <code>navigate-forward</code> is there which is also displayed based on some check. How to combine both?</p>
  
  <p>Following is my code -</p>
  
  <pre><code>&lt;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
              }"&gt;&lt;/span&gt;
  </code></pre>
  
  <p><code>child.className</code> will have a value based on some check in javascript code. And whatever value it gives I want to add that class to this <code>span</code>. </p>
  
  <p>Ex. if <code>child.className</code> is <code>tooltip</code> then that class should be added to the span.</p>
  
  <p><strong>output</strong></p>
  
  <pre><code>&lt;span class="menu-item navigate-forward tooltip"&gt;Menu item&lt;/span&gt;
  </code></pre>