how can you get a row by the index?
var rows = $(\'tr\', tbl); rows.index(0).addClass(\'my_class\');
Use .eq().
.eq()
var rows = $('tr', tbl); rows.eq(0).addClass('my_class');
...or for your simple case, .first():
.first()
rows.first().addClass('my_class');