complete.js 878 B

12345678910111213141516171819202122232425
  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. $('tr:nth-child(odd)').addClass('alt');
  9. $('a').filter(function() {
  10. return this.hostname && this.hostname != location.hostname;
  11. }).addClass('external');
  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. });