My SharePoint site needs to preserve the a:visited style defined in CSS for links. I added the following code, which appends "&Source=/" to each href. It seems that by changing the href via jQuery, the browser only "sees" the original href and therefore never triggers the a:visited style as there's no match...
$("table[class='ms-listviewtable'] td[class='ms-vb2'] a")
.removeAttr("onclick")
.attr('href', function(){
return $(this).attr('href') + '&Source=/';
});