Alternating-Table-Row-Color-with-jQuery-Css-Classes
How to make your table pretty with alternate row coloring using jQuery and CSS
First the style Sheet classes
we will make two classes to style the rows up
This style will affect table and the two classes are for row and alternate row
Second jQuery
jQuery has powerful feature of querying the page object
this function will get all tables that has id equals “MyTable”
and will iterate through its tr tags and get even and odd rows then apply CSS classes
The Complete Example:
Test Column 1 | Test Column 1 |
---|---|
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
That is extremely fascinating, You are a very specialist blogger. I have joined your feed and stay up for on the lookout for extra of your impressive post. Also, I have shared your website in my social networks!
Source URL: http://www.gehbeez.com/alternating-table-row-color-with-jquery-css-classes/