I am trying to change the background color with jQuery. What am I doing wrong? I know this can be done with CSS a lot easier but I am trying to do it with jQuery.
Link to jsfiddle. I am trying to change the background of "Hi" to yellow.
window.onload=function(){
$('.myClass td').css({'background-color': 'yellow'});
}
<table>
<tr class="myClass">
<td>Hi</td>
</tr>
<tr>
<td>Bye</td>
</tr>
</table>