lib-jquery-learning-code-02-chapter2.js / js
// Add a class to top-level list items. document.ready(function() { $('#selected-plays > li').addClass('horizontal'); $('#selected-plays li:not(.horizontal)').addClass('sub-level'); }); // Add a class to links. document.ready(function() { $('a[href^=mailto:]').addClass('mailto'); $('a[href// Give classes to even and odd table rows for zebra striping. document.ready(function() { // $('tr:odd').addClass('alt'); $('tr:nth-child(even)').addClass('alt'); $('td:contains(Henry)').nextAll().andSelf().addClass('highlight');//.siblings() $('th').parent().addClass('table-heading'); });
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.