Alternate row class using jQuery

<script type="text/javascript">
    $(function(){
    $("table.my_table tr:even").addClass("even");
    $("table.my_table tr:odd").addClass("odd");
    });
</script>


Example:

My Content
My Content
My Content
My Content
My Content