I have something like this:
\' onclick=\"SetBackgroundColor(this)\" style=\"background-color:Yellow\">
Whe
-
IE has a problem with background colors for the TR element. A more safe way is to set background to the TD's and TH's inside the TR:
testcell
Added: you can assign a single event handler for the entire table to increase performance:
$('#tabletest').bind('click', function(e) {
$(e.target).closest('tr').children('td,th').css('background-color','#000');
});
- 热议问题