02.06.2013 Views

DOM Traversal Methods

DOM Traversal Methods

DOM Traversal Methods

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table of Contents<br />

Preface 1<br />

Chapter 1: Anatomy of a jQuery Script 5<br />

A Dynamic Table of Contents 5<br />

Obtaining jQuery 7<br />

Setting Up the HTML Document 7<br />

Writing the jQuery Code 10<br />

Script Dissection 11<br />

Selector Expressions 11<br />

<strong>DOM</strong> <strong>Traversal</strong> <strong>Methods</strong> 11<br />

<strong>DOM</strong> Manipulation <strong>Methods</strong> 12<br />

Event <strong>Methods</strong> 12<br />

Effect <strong>Methods</strong> 13<br />

AJAX <strong>Methods</strong> 13<br />

Miscellaneous <strong>Methods</strong> 13<br />

Plug-In API 14<br />

Summary 14<br />

Chapter 2: Selector Expressions 17<br />

CSS Selectors 17<br />

Element: T 17<br />

ID: #myid 17<br />

Class: .myclass 18<br />

Descendant: E F 19<br />

Child: E > F 19<br />

Adjacent Sibling: E + F 20<br />

General Sibling: E ~ F 21<br />

Multiple Elements: E,F,G 22<br />

Nth Child (:nth-child(n)) 22<br />

First Child (:first-child) 23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!