Getting Parent TD Index.
Getting Parent TD Index.
Hello,
I am slightly stuck. Here is the scenario. I have the user click on a div. I then want to grab the Divs parent TD (in a a table) and get it's index in the Row it is in.
here is my logic:
-
$(crosstab).find(".salitem").click(function(event){
var rowchildren = $(this).parent().parent().children();
var tdchild = $(this).parent();
alert($(rowchildren).index(tdchild));
}