Build and design a table using jQuery

I have made a table in jquery but I don’t know how can I change it’s appearance like border and etc in Jquery !
also I need to change odd row’s color !
Example:
https://codepen.io/Hossi/pen/PrbOGJ

I have to do it with JQ !

Right, but my teacher ask me to do it with jQ

You should still use CSS for the style and not the table attributes as they are deprecated. You just target the element with Jquery and make the changes to the CSS properties like background and border.

You can also use :odd as the selector.

$('tr:odd').css('background', 'red');

https://api.jquery.com/category/selectors/

1 Like