I am having trouble getting an alternate-row css class applied to a knockout template with a foreach binding context. I am using knockout 2.1 with the available $index
$index
Don't do alternate row styling with Javascript, use CSS which is way more efficient :)
https://developer.mozilla.org/en-US/docs/CSS/:nth-child