23.04.2013 Views

javascript

javascript

javascript

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.

■ CONTENTS<br />

x<br />

Querying Attributes Like a Member . ................................................................................................... 281<br />

Querying Attributes with Methods . ..................................................................................................... 282<br />

Querying Attr Nodes ............................................................................................................................. 285<br />

Enumerating Attributes for an Element . .............................................................................................. 286<br />

Creating Element or Text Nodes . ........................................................................................................ 288<br />

Deleting Content .................................................................................................................................. 292<br />

Copying Content ................................................................................................................................... 293<br />

Creating Elements with a Helper Function . ......................................................................................... 294<br />

Reordering Nested Lists . 296<br />

Where Did the Formatting Text Nodes Go? . ........................................................................................ 302<br />

Summary . ................................................................................................................... 304<br />

■Chapter 8: Scripting CSS .................................................................................. 307<br />

DOM Interfaces for Working with CSS ........................................................................ 307<br />

Clarifying Some CSS Jargon ....................................................................................... 308<br />

How Does JavaScript Represent a Rule? . ........................................................................................... 308<br />

Two Other Declaration Blobs . ............................................................................................................. 310<br />

Downloading the Sample Files . ................................................................................. 310<br />

Querying a Style Attribute . ......................................................................................... 313<br />

Scripting Classes . ...................................................................................................... 318<br />

Scripting Rules . .......................................................................................................... 320<br />

Scripting Imported Style Sheets . ............................................................................... 326<br />

Adding or Deleting a Rule . ......................................................................................... 327<br />

Adding a Rule to a Style Sheet . ........................................................................................................... 328<br />

Deleting a Rule from a Style Sheet . .................................................................................................... 332<br />

Querying Overall Styles from the Cascade ................................................................. 334<br />

Enabling and Disabling Style Sheets . ........................................................................ 338<br />

Including or Importing Style Sheets . .......................................................................... 339<br />

Embedding a Style Sheet . .......................................................................................... 344<br />

Summary . ................................................................................................................... 345

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

Saved successfully!

Ooh no, something went wrong!