HTML:
<table border="1"style="width:500px" id="table2">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>grades</th>
</tr>
<tr>
<td>riddhi</td>
<td>bhatt</td>
<td>50</td>
</tr>
<tr>
<td>sneh</td>
<td>pandya</td>
<td>55</td>
</tr>
<tr>
<td>ankit</td>
<td>purani</td>
<td>60</td>
</tr>
</table>
I want to add a background color in odd rows of table.
JQuery:
$(document).ready(function(){
$("#table2 > tr:odd").css("background-color","blue");
});
I am new in HTML and jQuery, please suggest me so that I can proceed...