Binding Click event in KnockoutJS
- by user1918553
I have a which has a css binding according to the value of 'rowState' as follows which is working fine.
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.
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?