jQuery: The Write Less, Do More JavaScript Library

Error: Failed to load processor NavWiki
No macro or processor named 'NavWiki' found

All of the available methods are broken up by functionality.

CategoryIncludes
DOM Traversingfind, end, filter, not, add
Iterationsize, get, each
DOM Modificationset, html, remove, append, prepend, before, after, wrap
Stylecss, addClass, removeClass
Attributestext, html, val

The $() Function

$(Expression)

Error: Failed to load processor param
No macro or processor named 'param' found

finds all the p elements. From here, the $() function can be chained upon, adding more and more functionality. For a list of all methods included in the base package, please see the bottom of this page.

By default, $() looks for DOM elements with the current HTML document (which is what 99% of developers will need). If you need to change this, please see below.

Another example of the expressions available in jQuery is when you need to access by element ID and or class. This can be done using the CSS selector syntax - for example to find an item by ID you would use the "#" prefix:

  $("#element_id").click(...)

or by class by prefixing the class name with a ".":

  $(".class").click(...)

$(DOMElement)

Error: Failed to load processor param
No macro or processor named 'param' found

Description

If you pass in a DOM element to the $() function, jQuery will wrap itself around it and provide all the additional functionality that you need. For example, all of these are valid (using the advanced events module):

Examples

  $(document.getElementById("test")).click(...)
  $(document).ready(...)
  $(window).load(...)
  $(xml.responseXML) // For working with XMLHTTPRequest

$(Expression,Context)

Error: Failed to load processor param
No macro or processor named 'param' found

Description

The second argument to the $() function is an optional DOM Element, specifying the context within which all DOM Elements will be found. This is, effectively, a shorthand for doing:

  $(Context).find(...)

Examples

  $("p",document)
  $("title",xml.responseXML)
  $("div",document.getElementById("test"))

From here, you will want to start looking at the different types of methods that are available, to be used. Also, don't forget to look at the other modules available for download.