jQuery 101

jQuery's core philosophy:
Simplify interaction between HTML and JavaScript.
  1. Find some HTML
  2. Do something to it
The 'query' in the title is to emphasize the need to query for specific elements

Selectors / Attributes

The $() factory function to locate part of the page

$(selector/attribute).method().method()...

selector docs | attributes docs

Transversing

docs

Manipulation

docs

When to run code?

1:
$(document).ready(function() {
    $('a[href^=mailto:]').addClass('mailto');
    $('a[href$=.pdf]').addClass('pdflink');
    $('a[href^=http][href*=rit]').addclass('ritLink');
});

*for the ^,$,* substring matching selectors, check out the bottom of the page.

2:
$(document).ready(function() {
    $('td:contains(Dan)').parent().children().addClass('special');
});