binding click event to specific cell in all rows of a table
Hello,
in a table I want to have a specific click event (calling a function) for the first cell of each row and another function call e.g. for the third table cell.
I assigned different class names to these cells and used this script:
-
$("#tab_kat tr").find(".firstCell").bind("click", function() { ... });
And the same for ".thirdCell".
But is this possible without assigning class names to reduce the size of the code?
Something like that:
-
$("#tab_kat tr td.
cells[1]").bind("click", function() { ... });
?
thanks, Carlos