Table of Contents
Preface
Chapter 1: Anatomy of a jQuery Script
Chapter 2: Selector Expressions
Chapter 3: DOM Traversal Methods
Chapter 4: DOM Manipulation Methods
Chapter 5: Event Methods
Chapter 6: Effect Methods
Chapter 7: AJAX Methods
Chapter 8: Miscellaneous Methods
Chapter 9: jQuery Properties
Chapter 10: The Plug-in API
Chapter 11: Alphabetical Quick Reference
Appendix A: Online Resources
Appendix B: Development Tools
Index
- Chapter 1: Anatomy of a jQuery Script
- A dynamic table of contents
- Obtaining jQuery
- Setting up the HTML document
- Writing the jQuery code
- Script dissection
- Selector expressions
- DOM traversal methods
- DOM manipulation methods
- Event methods
- Effect methods
- AJAX methods
- Miscellaneous methods
- Plug-in API
- Summary
- A dynamic table of contents
- Chapter 2: Selector Expressions
- CSS selectors
- Element (T)
- ID (#myid)
- Class (.myclass)
- Descendant (E F)
- Child (E > F)
- Adjacent sibling (E + F)
- General sibling (E ~ F)
- Multiple expressions (E, F, G)
- Numbered child (:nth-child(n/even/odd/expr))
- First child (:first-child)
- Last child (:last-child)
- Only child (:only-child)
- Not (:not(E))
- Empty (:empty)
- Universal (*)
- Attribute selectors
- Attribute ([foo])
- Attribute equals ([foo=bar])
- Attribute does not equal ([foo!=bar])
- Attribute begins with ([foo^=bar])
- Attribute ends with ([foo$=bar])
- Attribute contains ([foo*=bar])
- Attribute contains word ([foo~=bar])
- Attribute contains prefix ([foo|=bar])
- Form selectors
- Custom selectors
- Element at index (:eq(n))
- Greater than (:gt(n))
- Less than (:lt(n))
- First (:first)
- Last (:last)
- Even element (:even)
- Odd element (:odd)
- Is parent (:parent)
- Contains text (:contains(text))
- Contains element (:has(E))
- Visible (:visible)
- Hidden (:hidden)
- Header element (:header)
- Currently animating (:animated)
- CSS selectors
- Chapter 3: DOM Traversal Methods
- The jQuery function
- $()
- Filtering methods
- .filter()
- .not()
- .has()
- .eq()
- .first()
- .last()
- .slice()
- Tree traversal methods
- .find()
- .children()
- .parents()
- .parentsUntil()
- .parent()
- .closest()
- .offsetParent()
- .siblings()
- .prev()
- .prevAll()
- .prevUntil()
- .next()
- .nextAll()
- .nextUntil()
- Miscellaneous traversal methods
- .add()
- .is()
- .end()
- .andSelf()
- .map()
- .contents()
- The jQuery function
- Chapter 4: DOM Manipulation Methods
- General attributes
- .attr() (getter)
- .attr() (setter)
- .removeAttr()
- Style properties
- .css() (getter)
- .css() (setter)
- .height() (getter)
- .height() (setter)
- .innerHeight()
- .outerHeight()
- .width() (getter)
- .width() (setter)
- .innerWidth()
- .outerWidth()
- .offset() (getter)
- .offset() (setter)
- .position()
- .scrollTop() (getter)
- .scrollTop() (setter)
- .scrollLeft() (getter)
- .scrollLeft() (setter)
- Class attributes
- .hasClass()
- .addClass()
- .removeClass()
- .toggleClass()
- DOM replacement
- .html() (getter)
- .html() (setter)
- .text() (getter)
- .text() (setter)
- .val() (getter)
- .val() (setter)
- .replaceWith()
- .replaceAll()
- DOM insertion, inside
- .prepend()
- .prependTo()
- .append()
- .appendTo()
- DOM insertion, outside
- .before()
- .insertBefore()
- .after()
- .insertAfter()
- DOM insertion, around
- .wrap()
- .wrapAll()
- .wrapInner()
- DOM copying
- .clone()
- DOM removal
- .empty()
- .remove()
- .detach()
- .unwrap()
- General attributes
- Chapter 5: Event Methods
- Event handler attachment
- .bind()
- .unbind()
- .one()
- .trigger()
- .triggerHandler()
- .live()
- .die()
- Document loading
- .ready()
- .load()
- .unload()
- .error()
- Mouse events
- .mousedown()
- .mouseup()
- .click()
- .dblclick()
- .toggle()
- .mouseover()
- .mouseout()
- .mouseenter()
- .mouseleave()
- .hover()
- .mousemove()
- Form events
- .focus()
- .blur()
- .change()
- .select()
- .submit()
- Keyboard events
- .keydown()
- .keypress()
- .keyup()
- Browser events
- .resize()
- .scroll()
- Event handler attachment
- Chapter 6: Effect Methods
- Pre-packaged effects
- .show()
- .hide()
- .toggle()
- .slideDown()
- .slideUp()
- .slideToggle()
- .fadeIn()
- .fadeOut()
- .fadeTo()
- Customized effects
- .animate()
- .stop()
- .delay()
- .queue()
- .dequeue()
- .clearQueue()
- Pre-packaged effects
- Chapter 7: AJAX Methods
- Low-level interface
- $.ajax()
- $.ajaxSetup()
- Shorthand methods
- $.get()
- .load()
- $.post()
- $.getJSON()
- $.getScript()
- Global AJAX event handlers
- .ajaxComplete()
- .ajaxError()
- .ajaxSend()
- .ajaxStart()
- .ajaxStop()
- .ajaxSuccess()
- Helper functions
- .serialize()
- .serializeArray()
- Low-level interface
- Chapter 8: Miscellaneous Methods
- Setup methods
- $.noConflict()
- DOM element methods
- .size()
- .get()
- .index()
- Collection manipulation
- .each()
- $.grep()
- $.makeArray()
- $.inArray()
- $.map()
- $.merge()
- $.unique()
- $.extend()
- $.trim()
- $.param()
- Introspection
- $.isArray()
- $.isFunction()
- $.isPlainObject()
- $.isEmptyObject()
- $.isXMLDoc()
- Data storage
- .data()
- .removeData()
- Setup methods
- Chapter 9: jQuery Properties
- Global properties
- $.browser
- $.support
- $.support.boxModel
- $.support.cssFloat
- $.support.hrefNormalized
- $.support.htmlSerialize
- $.support.leadingWhitespace
- $.support.noCloneEvent
- $.support.objectAll
- $.support.opacity
- $.support.scriptEval
- $.support.style
- $.support.tbody
- jQuery object properties
- .length
- .selector
- .context
- Global properties
- Chapter 10: The Plug-in API
- Using a plug-in
- Developing a plug-in
- Object method
- Global function
- Selector expression
- Plug-in conventions
- Use of the $ alias
- Naming conventions
- API standardization
- Chapter 11: Alphabetical Quick Reference
- Selector expressions
- Methods
- Properties
- Appendix A: Online Resources
- jQuery documentation
- JavaScript reference
- JavaScript code compressors
- JavaScript code decompressors
- (X)HTML reference
- CSS reference
- Useful blogs
- Web development frameworks using jQuery
- Appendix B: Development Tools
- Tools for Firefox
- Tools for Internet Explorer
- Tools for Safari
- Tools for Opera
- Other tools