2.15.js 859 B

123456789101112131415161718192021
  1. $(document).ready(function() {
  2. $('#selected-plays > li').addClass('horizontal');
  3. $('#selected-plays li:not(.horizontal)').addClass('sub-level');
  4. $('a[href^="mailto:"]').addClass('mailto');
  5. $('a[href$=".pdf"]').addClass('pdflink');
  6. $('a[href^="http"][href*="henry"]').addClass('henrylink');
  7. $('a').filter(function() {
  8. return this.hostname && this.hostname != location.hostname;
  9. }).addClass('external');
  10. $('tr:nth-child(odd)').addClass('alt');
  11. $('td:contains(Henry)') // Find every cell containing "Henry"
  12. .parent() // Select its parent
  13. .find('td:eq(1)') // Find the 2nd descendant cell
  14. .addClass('highlight') // Add the "highlight" class
  15. .end() // Return to the parent of the cell containing "Henry"
  16. .find('td:eq(2)') // Find the 3rd descendant cell
  17. .addClass('highlight'); // Add the "highlight" class
  18. });