Highlight rows of my table where checkbox is checked with knockout

qbn720

New Member
I have an html table with a checkbox on first column. I would like to highlight the row where checkboxes are checked with knockout.\[code\]<table class="defaultGrid"><thead> <tr> <th>Check</th> <th>ID</th> <th>Name</th> </tr></thead><tbody data-bind="foreach: model.Things"> <tr> <td><input type="checkbox" data-bind="click: $root.selectThing " /></td> <td data-bind="text: ID"></td> <td data-bind="text: Name"></td> </tr></tbody></table>\[/code\]Here is an example on jsFiddle: http://jsfiddle.net/jJ4H6/1/I don't know how to proceed. I don't want to add an extra property on my model like 'isSelected'.Any idea?Thanks.
 
Back
Top