I have a table set up now in just Knockout and jQuery and I need to be able to find the row index of a row that is clicked for selection. I have it set up so that my table is populated by a Knockout observable array and my table row click events are handled by the following function:
$("#table tr").live("click", callbackFunc(position));
But as you can see I need the position of the row that is clicked on to be passed in to the function for it to work. The last thing I tried was:
$("tr",$(this).parent("#table")).index(this)
But that only returned -1.
Anyone know of a solution?