I have the following code:
$("input:checkbox").click(function () {
getIndex($(this).attr("value").index(this));
}
The value of the check box and table header text match. When I click on the cb, I want to get the column index of the table column that corresponds to the cb text and then pass it to getIndex. How do I go about it?
So let us say the checkbox value is "Col1". There is a table column header with the same value "Col1". Similarly "Col2", Col3 and so on. When I click on a cb called "Col3", I want to find the corresponding table column index with the cb text that matches the column header text.