title: Binding Click event in KnockoutJS
body: <p>I have a div which has a css binding according to the value of 'rowState' as follows which is working fine.</p>
  
  <pre><code>&lt;div id="searchResult"  data-bind="css:{disabledRow: rowState === 2}"&gt;
  </code></pre>
  
  <p>Now, I need to bind the 'click' event to fire only if the rowState is not 2. I tried the following, but with no success.</p>
  
  <pre><code>&lt;div id="searchResult"  data-bind="click:{$parent.rowClicked: rowState !== 2}, css:{disabledRow: rowState === 2}"&gt;
  </code></pre>
  
  <p>I do not want to use the if statement as the div has got lots of content which I would need to repeat. The only difference is to make the div not clickable if rowState is 2.
  Could you please help me to sort this out? </p>