I have something like this:
\' onclick=\"SetBackgroundColor(this)\" style=\"background-color:Yellow\">
Whe
-
This will reset each row upon clicking a new one...
$(document).ready(function(){
$('tr').click(function(){
$('tr td').css({ 'background-color' : 'green'});
$('td', this).css({ 'background-color' : 'red' });
});
});
demo: http://jsbin.com/aciqi/
- 热议问题