if the row was clicked, you can access the row's cells with
- $("#prodTable tbody tr").live('click', function() {
- // modify cells by clicked row
- $(this).find('td').css("background-color","#FF0000");
- });
if all you have is the row index, you can do:
- function modifyCellsInRow(index) {
- // modify cells by index
- $('#prodTable tbody tr:eq('+index+') td').css("background-color","#FF0000");
- };
- modifyCellsInRow(0);
Edit: Your function can also be optimized a little,
- $("#prodTable tbody tr").live('click', function() {
- curRow = this.rowIndex;
- });
or
- $("#prodTable tbody tr").live('click', function() {
- curRow = $(this).index('#prodTable tbody tr');
- });
the first one should be quicker, the jQuery version makes a couple function calls and has to query the DOM which will slow things down.
-- Kevin
------------------------------------------------
http://www.tentonaxe.com