jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library
www.PACKTPUB.com  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
Book Contents Index > Chapter 4

Preface

1: Anatomy of a jQuery Script Free Chapter
2: Selector Expressions
3: DOM Traversal Methods
4: DOM Manipulation Methods
5: Event Methods
6: Effect Methods
7: AJAX Methods
8:
Miscellaneous Methods  
9: Plug-In API
10:
Dimensions Plug-In
11: Form Plug-In


Appendix A: Online Resources

Appendix B: Development Tools


Index

Latest Updates

Free Chapter:
Chapter 1: Anatomy of a jQuery Script [713 KB PDF]

Contact us

 

 

 

 

 

Chapter 4: DOM Manipulation Methods

Washed his hands of a deadly fate
He put himself in an altered state
    —Devo, "Mecha-mania Boy"

All of the methods in this chapter manipulate the DOM in some manner. A few of them simply change one of the attributes of an element, while others set an element's style properties. Still others modify entire elements (or groups of elements) themselves—inserting, copying, removing, and so on.

Chapter 4: DOM Manipulation Methods

  • General Attributes
    • .attr(attribute)
    • .attr()
    • .removeAttr()
  • Style Properties
    • .css(property)
    • .css()
    • .height()
    • .height(value)
    • .width()
    • .width(value)
  • Class Attribute
    • .addClass()
    • .removeClass()
    • .toggleClass()
  • DOM Replacement
    • .html()
    • .html(HTML)
    • .text()
    • .text(text)
    • .val()
    • .val(value)
  • DOM Insertion, Inside
    • .prepend()
    • .prependTo()
    • .append()
    • .appendTo()
  • DOM Insertion, Outside
    • .before()
    • .insertBefore()
    • .after()
    • .insertAfter()
  • DOM Insertion, Around
    • .wrap()
  • DOM Copying
    • .clone()
  • DOM Removal
    • .empty()
    • .remove()

 

 

   

 

Paperback 225 pages
Released: July 2007
ISBN: 1847193811
ISBN 13:
978-1-847193-81-0

     

 




View the book details
on PacktPub.com

 


 
  This website is owned and maintained by Packt Publishing Ltd, 2007. All rights reserved. Terms and Conditions