Exforsys.com
 

Sponsored Links

 

jQuery Tutorials

 
Home Tutorials jQuery
 

jQuery - JavaScript Sorting

 

Row Grouping Tags

Page 2 of 2


Row Grouping Tags

Note our use of the and tags to segment the data into row groupings. Many HTML authors omit these implied tags, but they can prove useful in supplying us with more convenient CSS selectors to use. For example, suppose we wish to apply typical even/odd row striping to this table, but only to the body of the table:



Sample Code
  1. $(document).ready(function() {
  2. $('table.sortable tbody tr:odd').addClass('odd')
  3. $('table.sortable tbody tr:even').addClass('even')
  4. })
Copyright exforsys.com



This will add alternating colors to the table, but leave the header untouched:





First Page: jQuery - JavaScript Sorting


Read Next: jQuery - Basic Alphabetical Sorting



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape