I have the following simple jQuery bit that tells me which row / column is a cell inside a table (excluding clans).
var col = $this.index() + 1; var row = $this.closest('tr').index() + 1;
Simple enough ... except that my tables are nested inside other tables, and I don't know what the offset is. For example, I have cell (1,1), this cell is in a table that is in the second cell of another table ... And this first cell has a table with three columns. So my cell is really (4.1)
EDIT: A more complete sample, with more test cases. I almost decided. Just some weird cases that cause problems. (now with color tests)
http://jsfiddle.net/gibble/J3uER/
... I understand that this is not normal, and html is stupid, but this is what I need to work with.
source share