Basic jQuery Methods - start with these A. Selecting $(selector) - this creates a set of HTML elements to be processed. Use any CSS selector $('p') $('#first') $('div#tabs ul > li:first') find - takes a selector as a parameter and creates a subset of HTML elements to be processed. $('p').find('.important') - the first selector returns all paragraphs and the 'find' selects from this set of paragraphs that have class 'important'. Any other non-paragraph elements with class 'important' will not be selected. This is a silly example since we could just write $('p.important') but find is useful in complex JQ staatements where: We want to choose a set and do something to all members. Next we want to do somethings additionally to a subset. $('p').css('background-color','white') .find('.important') .css('color','red') ; Note the indentation style with chaining. Its very important. Chains longer than 2 on a single line are hard to read. The semi-colon on its own line is optional. Just a matter of style. not(selector) - like 'find' but creates a subset of element that do not meet the criteria of the selector Navigating thru the DOM parent() childern() siblings() get one specific sibling: next() prev() B. Manipulating web page content These will either get (no parameter) or set (if a parameter is provided) html() text() css() Examples $('p:first').html() - returns the content of the first para $('p:first').html('The first para') - replaces the content of the first para with the string argument. append() prepend() - adds to the content of the selected element(s). $('p.key').prepend('This is very important'); adds a sentence at the beginning of the paragraph. after() before() - adds a new HTML element beside the selected element(s) $('p.key').prepend('
This is very important.
') add a new paragraph in front of the selected one(s). remove() attr() removeAttr() addClass() hasClass() toggleClass() C. Events and event binding - covered later