complete.js 876 B

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