Created
February 9, 2011 07:26
-
-
Save recursive/818103 to your computer and use it in GitHub Desktop.
jquery odd row example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| table {background:#ccc; color: white;} | |
| .odd {background:#777;} | |
| </style> | |
| <script src="http://code.jquery.com/jquery-1.5.min.js"></script> | |
| </head> | |
| <body> | |
| <table> | |
| <tr><td>Odd Row</td></tr> | |
| <tr><td>Even Row</td></tr> | |
| <tr><td>Another Odd</td></tr> | |
| <tr><td>Another Even</td></tr> | |
| </table> | |
| <script>jQuery("tr:odd").addClass('odd');</script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment