alt
Advertisement
Online Training
Career Series
Exforsys
Exforsys arrow Tutorials arrow jQuery arrow jQuery - JavaScript Sorting
Site Search


jQuery - JavaScript Sorting
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:

  1. $(document).ready(function() {
  2.  
  3. $('table.sortable tbody tr:odd').addClass('odd');
  4.  
  5. $('table.sortable tbody tr:even').addClass('even');
  6.  
  7. });
 

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


Trackback(0)
Comments (0)add comment

Write comment

busy

Article Index
jQuery - JavaScript Sorting
Row Grouping Tags

Row Grouping Tags

Note our use of the

 
< Prev   Next >
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape