highlight table row on click

highlight table row on click

I'm really stuck with this one.

to highlight current table row on mouseover:

$(".stripetable tr").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});


to zebra stripe table:

$(".stripetable tr:nth-child(odd)").addClass("alt");


to highlight table rows with the same text in column 2:

var column = 2
$('table.stripetables2 td:nth-child(' + column + ')' )
.click(function() {
var thisClicked = $(this).text()
$('table.stripetables2 td:nth-child(' + column + ')' )
.each(function(index) {
if (thisClicked == $(this).text()) {
$(this).parent().toggleClass('highlight')
} else {
$(this).parent().removeClass('highlight')
}
})
})


mouseover to highlight current table row and click to highlight table rows with the same text are working perfectly together. If I add the line to zebra stripe the table, everything gets messed up. Click and highlighting are not working.
Any idea? Thanks