Posted By

SteveRB511 on 11/23/10


Tagged

table jquery formatting


Versions (?)

jQuery Alternating Table Row Formatting


 / Published in: JavaScript
 

  1. <script type="text/javascript" src="../css-js/jquery-1.4.2.min.js"></script>
  2.  
  3. <script type="text/javascript">
  4. $( function()
  5. {
  6. $( ".informationTable tr:nth-child(even)" ).addClass( "rowDark" );
  7. $( ".informationTable tr:nth-child(odd)" ).addClass( "rowLight" );
  8. $( ".informationTable th" ).addClass( "rowHeader" );
  9. });
  10. </script>
  11.  
  12. <!-- Reference: http://docs.jquery.com/Tutorials:Zebra_Striping_Made_Easy -->

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: SteveRB511 on November 23, 2010

References: http://docs.jquery.com/Tutorials:ZebraStripingMade_Easy

You need to login to post a comment.