Hello
I am using jquery to highlight in a different colour just the selected row of a listview, so that only one row is highlighted at any one time
Why does the below code not work
<style>
.active {
background-color: red;
}
</style>
$(function () {
$('.ListView2 tr').click(function () {
$('tr').removeClass('active');
$(this).addClass('active');
});
});
Can you please help, if you remove this line
$('tr').removeClass('active'); it will highlight the selected row but not delete the previously selected row that is what this line of code just above is for, but not working correctly, thanks