<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='simple-docs-2.xsl'?>
<docs>
<method short='This function accepts a string containing a CSS selector,
basic XPath, or raw HTML, which is then used to match a set of elements.' type='jQuery' name='$' cat='Core'>
<params type='String' name='expr'>
<desc>An expression to search with, or a string of HTML to create on the fly.</desc>
</params>
<desc>This function accepts a string containing a CSS selector,
basic XPath, or raw HTML, which is then used to match a set of elements.
The HTML string is different from the traditional selectors in that
it creates the DOM elements representing that HTML string, on the fly,
to be (assumedly) inserted into the document later.

The core functionality of jQuery centers around this function.
Everything in jQuery is based upon this, or uses this in some way.
The most basic use of this function is to pass in an expression
(usually consisting of CSS or XPath), which then finds all matching
elements and remembers them for later use.

By default, $() looks for DOM elements within the context of the
current HTML document.</desc>
<examples>
<desc>This finds all p elements that are children of a div element.</desc>
<before>&lt;p&gt;one&lt;/p&gt; &lt;div&gt;&lt;p&gt;two&lt;/p&gt;&lt;/div&gt; &lt;p&gt;three&lt;/p&gt;</before>
<code>$("div &gt; p")</code>
<result>[ &lt;p&gt;two&lt;/p&gt; ]</result>
</examples>
<examples>
<desc>Creates a div element (and all of its contents) dynamically, and appends it to the element with the ID of body.</desc>
<code>$("&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;").appendTo("#body")</code>
</examples>
</method>
<method short='This function accepts a string containing a CSS selector, or
basic XPath, which is then used to match a set of elements with the
context of the specified DOM element, or document' type='jQuery' name='$' cat='Core'>
<params type='String' name='expr'>
<desc>An expression to search with.</desc>
</params>
<params type='Element' name='context'>
<desc>A DOM Element, or Document, representing the base context.</desc>
</params>
<desc>This function accepts a string containing a CSS selector, or
basic XPath, which is then used to match a set of elements with the
context of the specified DOM element, or document</desc>
<examples>
<desc>This finds all div elements within the specified XML document.</desc>
<code>$("div", xml.responseXML)</code>
</examples>
</method>
<method short='Wrap jQuery functionality around a specific DOM Element.' type='jQuery' name='$' cat='Core'>
<params type='Element' name='elem'>
<desc>A DOM element to be encapsulated by a jQuery object.</desc>
</params>
<desc>Wrap jQuery functionality around a specific DOM Element.
This function also accepts XML Documents and Window objects
as valid arguments (even though they are not DOM Elements).</desc>
<examples>
<code>$(document).find("div &gt; p")</code>
<result>[ &lt;p&gt;two&lt;/p&gt; ]</result>
<before>&lt;p&gt;one&lt;/p&gt; &lt;div&gt;&lt;p&gt;two&lt;/p&gt;&lt;/div&gt; &lt;p&gt;three&lt;/p&gt;</before>
</examples>
<examples>
<desc>Sets the background color of the page to black.</desc>
<code>$(document.body).background( "black" );</code>
</examples>
</method>
<method short='Wrap jQuery functionality around a set of DOM Elements.' type='jQuery' name='$' cat='Core'>
<params type='Array&lt;Element&gt;' name='elems'>
<desc>An array of DOM elements to be encapsulated by a jQuery object.</desc>
</params>
<desc>Wrap jQuery functionality around a set of DOM Elements.</desc>
<examples>
<desc>Hides all the input elements within a form</desc>
<code>$( myForm.elements ).hide()</code>
</examples>
</method>
<method short='A shorthand for $(document).' type='jQuery' name='$' cat='Core'>
<params type='Function' name='fn'>
<desc>The function to execute when the DOM is ready.</desc>
</params>
<desc>A shorthand for $(document).ready(), allowing you to bind a function
to be executed when the DOM document has finished loading. This function
behaves just like $(document).ready(), in that it should be used to wrap
all of the other $() operations on your page. While this function is,
technically, chainable - there really isn't much use for chaining against it.</desc>
<examples>
<desc>Executes the function when the DOM is ready to be used.</desc>
<code>$(function(){
  // Document is ready
});</code>
</examples>
</method>
<method short='A means of creating a cloned copy of a jQuery object.' type='jQuery' name='$' cat='Core'>
<params type='jQuery' name='obj'>
<desc>The jQuery object to be cloned.</desc>
</params>
<desc>A means of creating a cloned copy of a jQuery object. This function
copies the set of matched elements from one jQuery object and creates
another, new, jQuery object containing the same elements.</desc>
<examples>
<desc>Locates all p elements with all div elements, without disrupting the original jQuery object contained in 'div' (as would normally be the case if a simple div.find("p") was done).</desc>
<code>var div = $("div");
$( div ).find("p");</code>
</examples>
</method>
<method property='1' cat='Core' type='String' short='The current SVN version of jQuery.' private='1' name='jquery'>
<desc>The current SVN version of jQuery.</desc>
</method>
<method property='1' cat='Core' type='Number' short='The number of elements currently matched.' name='length'>
<desc>The number of elements currently matched.</desc>
<examples>
<code>$("img").length;</code>
<result>2</result>
<before>&lt;img src="test1.jpg"/&gt; &lt;img src="test2.jpg"/&gt;</before>
</examples>
<tests>ok( $("div").length == 2, "Get Number of Elements Found" );</tests>
</method>
<method short='The number of elements currently matched.' type='Number' name='size' cat='Core'>
<desc>The number of elements currently matched.</desc>
<tests>ok( $("div").size() == 2, "Get Number of Elements Found" );</tests>
<examples>
<code>$("img").size();</code>
<result>2</result>
<before>&lt;img src="test1.jpg"/&gt; &lt;img src="test2.jpg"/&gt;</before>
</examples>
</method>
<method short='Access all matched elements.' type='Array&lt;Element&gt;' name='get' cat='Core'>
<desc>Access all matched elements. This serves as a backwards-compatible
way of accessing all matched elements (other than the jQuery object
itself, which is, in fact, an array of elements).</desc>
<tests>isSet( $("div").get(), q("main","foo"), "Get All Elements" );</tests>
<examples>
<code>$("img").get();</code>
<result>[ &lt;img src="test1.jpg"/&gt; &lt;img src="test2.jpg"/&gt; ]</result>
<before>&lt;img src="test1.jpg"/&gt; &lt;img src="test2.jpg"/&gt;</before>
</examples>
</method>
<method short='Access a single matched element.' type='Element' name='get' cat='Core'>
<params type='Number' name='num'>
<desc>Access the element in the Nth position.</desc>
</params>
<desc>Access a single matched element. num is used to access the
Nth element matched.</desc>
<tests>ok( $("div").get(0) == document.getElementById("main"), "Get A Single Element" );</tests>
<examples>
<code>$("img").get(1);</code>
<result>[ &lt;img src="test1.jpg"/&gt; ]</result>
<before>&lt;img src="test1.jpg"/&gt; &lt;img src="test2.jpg"/&gt;</before>
</examples>
</method>
<method cat='Core' type='jQuery' short='Set the jQuery object to an array of elements.' private='1' name='get'>
<desc>Set the jQuery object to an array of elements.</desc>
<params type='Elements' name='elems'>
<desc>An array of elements</desc>
</params>
<examples>
<code>$("img").get([ document.body ]);</code>
<result>$("img").get() == [ document.body ]</result>
</examples>
</method>
<method short='Execute a function within the context of every matched element.' type='jQuery' name='each' cat='Core'>
<params type='Function' name='fn'>
<desc>A function to execute</desc>
</params>
<desc>Execute a function within the context of every matched element.
This means that every time the passed-in function is executed
(which is once for every element matched) the 'this' keyword
points to the specific element.

Additionally, the function, when executed, is passed a single
argument representing the position of the element in the matched
set.</desc>
<tests>var div = $("div");
div.each(function(){this.foo = 'zoo';});
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
  if ( div.get(i).foo != "zoo" ) pass = false;
}
ok( pass, "Execute a function, Relative" );</tests>
<examples>
<code>$("img").each(function(){
  this.src = "test.jpg";
});</code>
<result>&lt;img src="test.jpg"/&gt; &lt;img src="test.jpg"/&gt;</result>
<before>&lt;img/&gt; &lt;img/&gt;</before>
</examples>
<examples>
<code>$("img").each(function(i){
  alert( "Image #" + i + " is " + this );
});</code>
<result>&lt;img src="test.jpg"/&gt; &lt;img src="test.jpg"/&gt;</result>
<before>&lt;img/&gt; &lt;img/&gt;</before>
</examples>
</method>
<method short='Searches every matched element for the object and returns
the index of the element, if found, starting with zero.' type='Number' name='index' cat='Core'>
<params type='Object' name='obj'>
<desc>Object to search for</desc>
</params>
<desc>Searches every matched element for the object and returns
the index of the element, if found, starting with zero. 
Returns -1 if the object wasn't found.</desc>
<tests>ok( $([window, document]).index(window) == 0, "Check for index of elements" );</tests>
<tests>ok( $([window, document]).index(document) == 1, "Check for index of elements" );</tests>
<tests>var inputElements = $('#radio1,#radio2,#check1,#check2');</tests>
<tests>ok( inputElements.index(document.getElementById('radio1')) == 0, "Check for index of elements" );</tests>
<tests>ok( inputElements.index(document.getElementById('radio2')) == 1, "Check for index of elements" );</tests>
<tests>ok( inputElements.index(document.getElementById('check1')) == 2, "Check for index of elements" );</tests>
<tests>ok( inputElements.index(document.getElementById('check2')) == 3, "Check for index of elements" );</tests>
<tests>ok( inputElements.index(window) == -1, "Check for not found index" );</tests>
<tests>ok( inputElements.index(document) == -1, "Check for not found index" );</tests>
<examples>
<code>$("*").index(document.getElementById('foobar'))</code>
<result>0</result>
<before>&lt;div id="foobar"&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;span id="foo"&gt;&lt;/span&gt;</before>
</examples>
<examples>
<code>$("*").index(document.getElementById('foo'))</code>
<result>2</result>
<before>&lt;div id="foobar"&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;span id="foo"&gt;&lt;/span&gt;</before>
</examples>
<examples>
<code>$("*").index(document.getElementById('bar'))</code>
<result>-1</result>
<before>&lt;div id="foobar"&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;span id="foo"&gt;&lt;/span&gt;</before>
</examples>
</method>
<method short='Access a property on the first matched element.' type='Object' name='attr' cat='DOM'>
<params type='String' name='name'>
<desc>The name of the property to access.</desc>
</params>
<desc>Access a property on the first matched element.
This method makes it easy to retrieve a property value
from the first matched element.</desc>
<tests>ok( $('#text1').attr('value') == "Test", 'Check for value attribute' );</tests>
<tests>ok( $('#text1').attr('type') == "text", 'Check for type attribute' );</tests>
<tests>ok( $('#radio1').attr('type') == "radio", 'Check for type attribute' );</tests>
<tests>ok( $('#check1').attr('type') == "checkbox", 'Check for type attribute' );</tests>
<tests>ok( $('#simon1').attr('rel') == "bookmark", 'Check for rel attribute' );</tests>
<tests>ok( $('#google').attr('title') == "Google!", 'Check for title attribute' );</tests>
<tests>ok( $('#mark').attr('hreflang') == "en", 'Check for hreflang attribute' );</tests>
<tests>ok( $('#en').attr('lang') == "en", 'Check for lang attribute' );</tests>
<tests>ok( $('#simon').attr('class') == "blog link", 'Check for class attribute' );</tests>
<tests>ok( $('#name').attr('name') == "name", 'Check for name attribute' );</tests>
<tests>ok( $('#text1').attr('name') == "action", 'Check for name attribute' );</tests>
<tests>ok( $('#form').attr('action') == "formaction", 'Check for action attribute' );</tests>
<examples>
<code>$("img").attr("src");</code>
<result>test.jpg</result>
<before>&lt;img src="test.jpg"/&gt;</before>
</examples>
</method>
<method short='Set a hash of key/value object properties to all matched elements.' type='jQuery' name='attr' cat='DOM'>
<params type='Hash' name='prop'>
<desc>A set of key/value pairs to set as object properties.</desc>
</params>
<desc>Set a hash of key/value object properties to all matched elements.
This serves as the best way to set a large number of properties
on all matched elements.</desc>
<tests>var pass = true;
$("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){
  if ( this.getAttribute('foo') != "baz" &amp;&amp; this.getAttribute('zoo') != "ping" ) pass = false;
});
ok( pass, "Set Multiple Attributes" );</tests>
<examples>
<code>$("img").attr({ src: "test.jpg", alt: "Test Image" });</code>
<result>&lt;img src="test.jpg" alt="Test Image"/&gt;</result>
<before>&lt;img/&gt;</before>
</examples>
</method>
<method short='Set a single property to a value, on all matched elements.' type='jQuery' name='attr' cat='DOM'>
<params type='String' name='key'>
<desc>The name of the property to set.</desc>
</params>
<params type='Object' name='value'>
<desc>The value to set the property to.</desc>
</params>
<desc>Set a single property to a value, on all matched elements.</desc>
<tests>var div = $("div");
div.attr("foo", "bar");
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
  if ( div.get(i).getAttribute('foo') != "bar" ) pass = false;
}
ok( pass, "Set Attribute" );</tests>
<tests>$("#name").attr('name', 'something');
ok( $("#name").name() == 'something', 'Set name attribute' );</tests>
<tests>$("#check2").attr('checked', true);
ok( document.getElementById('check2').checked == true, 'Set checked attribute' );
$("#check2").attr('checked', false);
ok( document.getElementById('check2').checked == false, 'Set checked attribute' );</tests>
<examples>
<code>$("img").attr("src","test.jpg");</code>
<result>&lt;img src="test.jpg"/&gt;</result>
<before>&lt;img/&gt;</before>
</examples>
</method>
<method short='Access a style property on the first matched element.' type='Object' name='css' cat='CSS'>
<params type='String' name='name'>
<desc>The name of the property to access.</desc>
</params>
<desc>Access a style property on the first matched element.
This method makes it easy to retrieve a style property value
from the first matched element.</desc>
<tests>ok( $('#foo').css("display") == 'block', 'Check for css property "display"');</tests>
<examples>
<desc>Retrieves the color style of the first paragraph</desc>
<before>&lt;p style="color:red;"&gt;Test Paragraph.&lt;/p&gt;</before>
<code>$("p").css("color");</code>
<result>red</result>
</examples>
<examples>
<desc>Retrieves the font-weight style of the first paragraph.
Note that for all style properties with a dash (like 'font-weight'), you have to
write it in camelCase. In other words: Every time you have a '-' in a 
property, remove it and replace the next character with an uppercase 
representation of itself. Eg. fontWeight, fontSize, fontFamily, borderWidth,
borderStyle, borderBottomWidth etc.</desc>
<before>&lt;p style="font-weight: bold;"&gt;Test Paragraph.&lt;/p&gt;</before>
<code>$("p").css("fontWeight");</code>
<result>bold</result>
</examples>
</method>
<method short='Set a hash of key/value style properties to all matched elements.' type='jQuery' name='css' cat='CSS'>
<params type='Hash' name='prop'>
<desc>A set of key/value pairs to set as style properties.</desc>
</params>
<desc>Set a hash of key/value style properties to all matched elements.
This serves as the best way to set a large number of style properties
on all matched elements.</desc>
<tests>ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');</tests>
<tests>$('#foo').css({display: 'none'});
ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');</tests>
<tests>$('#foo').css({display: 'block'});
ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible');</tests>
<examples>
<code>$("p").css({ color: "red", background: "blue" });</code>
<result>&lt;p style="color:red; background:blue;"&gt;Test Paragraph.&lt;/p&gt;</result>
<before>&lt;p&gt;Test Paragraph.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set a single style property to a value, on all matched elements.' type='jQuery' name='css' cat='CSS'>
<params type='String' name='key'>
<desc>The name of the property to set.</desc>
</params>
<params type='Object' name='value'>
<desc>The value to set the property to.</desc>
</params>
<desc>Set a single style property to a value, on all matched elements.</desc>
<tests>ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');</tests>
<tests>$('#foo').css('display', 'none');
ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');</tests>
<tests>$('#foo').css('display', 'block');
ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible');</tests>
<examples>
<desc>Changes the color of all paragraphs to red</desc>
<before>&lt;p&gt;Test Paragraph.&lt;/p&gt;</before>
<code>$("p").css("color","red");</code>
<result>&lt;p style="color:red;"&gt;Test Paragraph.&lt;/p&gt;</result>
</examples>
</method>
<method short='Retrieve the text contents of all matched elements.' type='String' name='text' cat='DOM'>
<desc>Retrieve the text contents of all matched elements. The result is
a string that contains the combined text contents of all matched
elements. This method works on both HTML and XML documents.</desc>
<tests>var expected = "This link has class=\"blog\": Simon Willison's Weblog";
ok( $('#sap').text() == expected, 'Check for merged text of more then one element.' );</tests>
<examples>
<code>$("p").text();</code>
<result>Test Paragraph.</result>
<before>&lt;p&gt;Test Paragraph.&lt;/p&gt;</before>
</examples>
</method>
<method short='Wrap all matched elements with a structure of other elements.' type='jQuery' name='wrap' cat='DOM/Manipulation'>
<params type='String' name='html'>
<desc>A string of HTML, that will be created on the fly and wrapped around the target.</desc>
</params>
<desc>Wrap all matched elements with a structure of other elements.
This wrapping process is most useful for injecting additional
stucture into a document, without ruining the original semantic
qualities of a document.

This works by going through the first element
provided (which is generated, on the fly, from the provided HTML)
and finds the deepest ancestor element within its
structure - it is that element that will en-wrap everything else.

This does not work with elements that contain text. Any necessary text
must be added after the wrapping is done.</desc>
<tests>var defaultText = 'Try them out:'
var result = $('#first').wrap('&lt;div class="red"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;').text();
ok( defaultText == result, 'Check for wrapping of on-the-fly html' );
ok( $('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' );</tests>
<examples>
<code>$("p").wrap("&lt;div class='wrap'&gt;&lt;/div&gt;");</code>
<result>&lt;div class='wrap'&gt;&lt;p&gt;Test Paragraph.&lt;/p&gt;&lt;/div&gt;</result>
<before>&lt;p&gt;Test Paragraph.&lt;/p&gt;</before>
</examples>
</method>
<method short='Wrap all matched elements with a structure of other elements.' type='jQuery' name='wrap' cat='DOM/Manipulation'>
<params type='Element' name='elem'>
<desc>A DOM element that will be wrapped.</desc>
</params>
<desc>Wrap all matched elements with a structure of other elements.
This wrapping process is most useful for injecting additional
stucture into a document, without ruining the original semantic
qualities of a document.

This works by going through the first element
provided and finding the deepest ancestor element within its
structure - it is that element that will en-wrap everything else.

This does not work with elements that contain text. Any necessary text
must be added after the wrapping is done.</desc>
<tests>var defaultText = 'Try them out:'
var result = $('#first').wrap(document.getElementById('empty')).parent();
ok( result.is('ol'), 'Check for element wrapping' );
ok( result.text() == defaultText, 'Check for element wrapping' );</tests>
<examples>
<code>$("p").wrap( document.getElementById('content') );</code>
<result>&lt;div id="content"&gt;&lt;p&gt;Test Paragraph.&lt;/p&gt;&lt;/div&gt;</result>
<before>&lt;p&gt;Test Paragraph.&lt;/p&gt;&lt;div id="content"&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Append any number of elements to the inside of every matched elements,
generated from the provided HTML.' type='jQuery' name='append' cat='DOM/Manipulation'>
<params type='String' name='html'>
<desc>A string of HTML, that will be created on the fly and appended to the target.</desc>
</params>
<desc>Append any number of elements to the inside of every matched elements,
generated from the provided HTML.
This operation is similar to doing an appendChild to all the
specified elements, adding them into the document.</desc>
<tests>var defaultText = 'Try them out:'
var result = $('#first').append('&lt;b&gt;buga&lt;/b&gt;');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );</tests>
<examples>
<code>$("p").append("&lt;b&gt;Hello&lt;/b&gt;");</code>
<result>&lt;p&gt;I would like to say: &lt;b&gt;Hello&lt;/b&gt;&lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='Append an element to the inside of all matched elements.' type='jQuery' name='append' cat='DOM/Manipulation'>
<params type='Element' name='elem'>
<desc>A DOM element that will be appended.</desc>
</params>
<desc>Append an element to the inside of all matched elements.
This operation is similar to doing an appendChild to all the
specified elements, adding them into the document.</desc>
<tests>var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
$('#sap').append(document.getElementById('first'));
ok( expected == $('#sap').text(), "Check for appending of element" );</tests>
<examples>
<code>$("p").append( $("#foo")[0] );</code>
<result>&lt;p&gt;I would like to say: &lt;b id="foo"&gt;Hello&lt;/b&gt;&lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;</before>
</examples>
</method>
<method short='Append any number of elements to the inside of all matched elements.' type='jQuery' name='append' cat='DOM/Manipulation'>
<params type='Array&lt;Element&gt;' name='elems'>
<desc>An array of elements, all of which will be appended.</desc>
</params>
<desc>Append any number of elements to the inside of all matched elements.
This operation is similar to doing an appendChild to all the
specified elements, adding them into the document.</desc>
<tests>var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";
$('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]);
ok( expected == $('#sap').text(), "Check for appending of array of elements" );</tests>
<examples>
<code>$("p").append( $("b") );</code>
<result>&lt;p&gt;I would like to say: &lt;b&gt;Hello&lt;/b&gt;&lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;</before>
</examples>
</method>
<method short='Prepend any number of elements to the inside of every matched elements,
generated from the provided HTML.' type='jQuery' name='prepend' cat='DOM/Manipulation'>
<params type='String' name='html'>
<desc>A string of HTML, that will be created on the fly and appended to the target.</desc>
</params>
<desc>Prepend any number of elements to the inside of every matched elements,
generated from the provided HTML.
This operation is the best way to insert dynamically created elements
inside, at the beginning, of all the matched element.</desc>
<tests>var defaultText = 'Try them out:'
var result = $('#first').prepend('&lt;b&gt;buga&lt;/b&gt;');
ok( result.text() == 'buga' + defaultText, 'Check if text prepending works' );</tests>
<examples>
<code>$("p").prepend("&lt;b&gt;Hello&lt;/b&gt;");</code>
<result>&lt;p&gt;&lt;b&gt;Hello&lt;/b&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='Prepend an element to the inside of all matched elements.' type='jQuery' name='prepend' cat='DOM/Manipulation'>
<params type='Element' name='elem'>
<desc>A DOM element that will be appended.</desc>
</params>
<desc>Prepend an element to the inside of all matched elements.
This operation is the best way to insert an element inside, at the
beginning, of all the matched element.</desc>
<tests>var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";
$('#sap').prepend(document.getElementById('first'));
ok( expected == $('#sap').text(), "Check for prepending of element" );</tests>
<examples>
<code>$("p").prepend( $("#foo")[0] );</code>
<result>&lt;p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;</before>
</examples>
</method>
<method short='Prepend any number of elements to the inside of all matched elements.' type='jQuery' name='prepend' cat='DOM/Manipulation'>
<params type='Array&lt;Element&gt;' name='elems'>
<desc>An array of elements, all of which will be appended.</desc>
</params>
<desc>Prepend any number of elements to the inside of all matched elements.
This operation is the best way to insert a set of elements inside, at the
beginning, of all the matched element.</desc>
<tests>var expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";
$('#sap').prepend([document.getElementById('first'), document.getElementById('yahoo')]);
ok( expected == $('#sap').text(), "Check for prepending of array of elements" );</tests>
<examples>
<code>$("p").prepend( $("b") );</code>
<result>&lt;p&gt;&lt;b&gt;Hello&lt;/b&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;</before>
</examples>
</method>
<method short='Insert any number of dynamically generated elements before each of the
matched elements.' type='jQuery' name='before' cat='DOM/Manipulation'>
<params type='String' name='html'>
<desc>A string of HTML, that will be created on the fly and appended to the target.</desc>
</params>
<desc>Insert any number of dynamically generated elements before each of the
matched elements.</desc>
<tests>var expected = 'This is a normal link: bugaYahoo';
$('#yahoo').before('&lt;b&gt;buga&lt;/b&gt;');
ok( expected == $('#en').text(), 'Insert String before' );</tests>
<examples>
<code>$("p").before("&lt;b&gt;Hello&lt;/b&gt;");</code>
<result>&lt;b&gt;Hello&lt;/b&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='Insert an element before each of the matched elements.' type='jQuery' name='before' cat='DOM/Manipulation'>
<params type='Element' name='elem'>
<desc>A DOM element that will be appended.</desc>
</params>
<desc>Insert an element before each of the matched elements.</desc>
<tests>var expected = "This is a normal link: Try them out:Yahoo";
$('#yahoo').before(document.getElementById('first'));
ok( expected == $('#en').text(), "Insert element before" );</tests>
<examples>
<code>$("p").before( $("#foo")[0] );</code>
<result>&lt;b id="foo"&gt;Hello&lt;/b&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;</before>
</examples>
</method>
<method short='Insert any number of elements before each of the matched elements.' type='jQuery' name='before' cat='DOM/Manipulation'>
<params type='Array&lt;Element&gt;' name='elems'>
<desc>An array of elements, all of which will be appended.</desc>
</params>
<desc>Insert any number of elements before each of the matched elements.</desc>
<tests>var expected = "This is a normal link: Try them out:diveintomarkYahoo";
$('#yahoo').before([document.getElementById('first'), document.getElementById('mark')]);
ok( expected == $('#en').text(), "Insert array of elements before" );</tests>
<examples>
<code>$("p").before( $("b") );</code>
<result>&lt;b&gt;Hello&lt;/b&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;</before>
</examples>
</method>
<method short='Insert any number of dynamically generated elements after each of the
matched elements.' type='jQuery' name='after' cat='DOM/Manipulation'>
<params type='String' name='html'>
<desc>A string of HTML, that will be created on the fly and appended to the target.</desc>
</params>
<desc>Insert any number of dynamically generated elements after each of the
matched elements.</desc>
<tests>var expected = 'This is a normal link: Yahoobuga';
$('#yahoo').after('&lt;b&gt;buga&lt;/b&gt;');
ok( expected == $('#en').text(), 'Insert String after' );</tests>
<examples>
<code>$("p").after("&lt;b&gt;Hello&lt;/b&gt;");</code>
<result>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='Insert an element after each of the matched elements.' type='jQuery' name='after' cat='DOM/Manipulation'>
<params type='Element' name='elem'>
<desc>A DOM element that will be appended.</desc>
</params>
<desc>Insert an element after each of the matched elements.</desc>
<tests>var expected = "This is a normal link: YahooTry them out:";
$('#yahoo').after(document.getElementById('first'));
ok( expected == $('#en').text(), "Insert element after" );</tests>
<examples>
<code>$("p").after( $("#foo")[0] );</code>
<result>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;</result>
<before>&lt;b id="foo"&gt;Hello&lt;/b&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='Insert any number of elements after each of the matched elements.' type='jQuery' name='after' cat='DOM/Manipulation'>
<params type='Array&lt;Element&gt;' name='elems'>
<desc>An array of elements, all of which will be appended.</desc>
</params>
<desc>Insert any number of elements after each of the matched elements.</desc>
<tests>var expected = "This is a normal link: YahooTry them out:diveintomark";
$('#yahoo').after([document.getElementById('first'), document.getElementById('mark')]);
ok( expected == $('#en').text(), "Insert array of elements after" );</tests>
<examples>
<code>$("p").after( $("b") );</code>
<result>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;</result>
<before>&lt;b&gt;Hello&lt;/b&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='End the most recent &apos;destructive&apos; operation, reverting the list of matched elements
back to its previous state.' type='jQuery' name='end' cat='DOM/Traversing'>
<desc>End the most recent 'destructive' operation, reverting the list of matched elements
back to its previous state. After an end operation, the list of matched elements will
revert to the last state of matched elements.</desc>
<tests>ok( 'Yahoo' == $('#yahoo').parent().end().text(), 'Check for end' );</tests>
<examples>
<code>$("p").find("span").end();</code>
<result>$("p").find("span").end() == [ &lt;p&gt;...&lt;/p&gt; ]</result>
<before>&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;, how are you?&lt;/p&gt;</before>
</examples>
</method>
<method short='Searches for all elements that match the specified expression.' type='jQuery' name='find' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to search with.</desc>
</params>
<desc>Searches for all elements that match the specified expression.
This method is the optimal way of finding additional descendant
elements with which to process.

All searching is done using a jQuery expression. The expression can be
written using CSS 1-3 Selector syntax, or basic XPath.</desc>
<tests>ok( 'Yahoo' == $('#foo').find('.blogTest').text(), 'Check for find' );</tests>
<examples>
<code>$("p").find("span");</code>
<result>$("p").find("span") == [ &lt;span&gt;Hello&lt;/span&gt; ]</result>
<before>&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;, how are you?&lt;/p&gt;</before>
</examples>
</method>
<method short='Create cloned copies of all matched DOM Elements.' type='jQuery' name='clone' cat='DOM/Manipulation'>
<desc>Create cloned copies of all matched DOM Elements. This does
not create a cloned copy of this particular jQuery object,
instead it creates duplicate copies of all DOM Elements.
This is useful for moving copies of the elements to another
location in the DOM.</desc>
<tests>ok( 'This is a normal link: Yahoo' == $('#en').text(), 'Assert text for #en' );
var clone = $('#yahoo').clone();
ok( 'Try them out:Yahoo' == $('#first').append(clone).text(), 'Check for clone' );
ok( 'This is a normal link: Yahoo' == $('#en').text(), 'Reassert text for #en' );</tests>
<examples>
<code>$("b").clone().prependTo("p");</code>
<result>&lt;b&gt;Hello&lt;/b&gt;&lt;p&gt;&lt;b&gt;Hello&lt;/b&gt;, how are you?&lt;/p&gt;</result>
<before>&lt;b&gt;Hello&lt;/b&gt;&lt;p&gt;, how are you?&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all elements from the set of matched elements that do not
match the specified expression.' type='jQuery' name='filter' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to search with.</desc>
</params>
<desc>Removes all elements from the set of matched elements that do not
match the specified expression. This method is used to narrow down
the results of a search.

All searching is done using a jQuery expression. The expression
can be written using CSS 1-3 Selector syntax, or basic XPath.</desc>
<tests>isSet( $("input").filter(":checked").get(), q("radio2", "check1"), "Filter elements" );</tests>
<examples>
<code>$("p").filter(".selected")</code>
<result>$("p").filter(".selected") == [ &lt;p class="selected"&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p class="selected"&gt;Hello&lt;/p&gt;&lt;p&gt;How are you?&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all elements from the set of matched elements that do not
match at least one of the expressions passed to the function.' type='jQuery' name='filter' cat='DOM/Traversing'>
<params type='Array&lt;String&gt;' name='exprs'>
<desc>A set of expressions to evaluate against</desc>
</params>
<desc>Removes all elements from the set of matched elements that do not
match at least one of the expressions passed to the function. This
method is used when you want to filter the set of matched elements
through more than one expression.

Elements will be retained in the jQuery object if they match at
least one of the expressions passed.</desc>
<examples>
<code>$("p").filter([".selected", ":first"])</code>
<result>$("p").filter([".selected", ":first"]) == [ &lt;p&gt;Hello&lt;/p&gt;, &lt;p class="selected"&gt;And Again&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;Hello Again&lt;/p&gt;&lt;p class="selected"&gt;And Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes the specified Element from the set of matched elements.' type='jQuery' name='not' cat='DOM/Traversing'>
<params type='Element' name='el'>
<desc>An element to remove from the set</desc>
</params>
<desc>Removes the specified Element from the set of matched elements. This
method is used to remove a single Element from a jQuery object.</desc>
<examples>
<code>$("p").not( document.getElementById("selected") )</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p id="selected"&gt;Hello Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes elements matching the specified expression from the set
of matched elements.' type='jQuery' name='not' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression with which to remove matching elements</desc>
</params>
<desc>Removes elements matching the specified expression from the set
of matched elements. This method is used to remove one or more
elements from a jQuery object.</desc>
<tests>ok($("#main &gt; p#ap &gt; a").not("#google").length == 2, ".not")</tests>
<examples>
<code>$("p").not("#selected")</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p id="selected"&gt;Hello Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Adds the elements matched by the expression to the jQuery object.' type='jQuery' name='add' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression whose matched elements are added</desc>
</params>
<desc>Adds the elements matched by the expression to the jQuery object. This
can be used to concatenate the result sets of two expressions.</desc>
<examples>
<code>$("p").add("span")</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt;, &lt;span&gt;Hello Again&lt;/span&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/p&gt;</before>
</examples>
</method>
<method short='Adds each of the Elements in the array to the set of matched elements.' type='jQuery' name='add' cat='DOM/Traversing'>
<params type='Array&lt;Element&gt;' name='els'>
<desc>An array of Elements to add</desc>
</params>
<desc>Adds each of the Elements in the array to the set of matched elements.
This is used to add a set of Elements to a jQuery object.</desc>
<examples>
<code>$("p").add([document.getElementById("a"), document.getElementById("b")])</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt;, &lt;span id="a"&gt;Hello Again&lt;/span&gt;, &lt;span id="b"&gt;And Again&lt;/span&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;&lt;span id="a"&gt;Hello Again&lt;/span&gt;&lt;span id="b"&gt;And Again&lt;/span&gt;&lt;/p&gt;</before>
</examples>
</method>
<method short='Adds a single Element to the set of matched elements.' type='jQuery' name='add' cat='DOM/Traversing'>
<params type='Element' name='el'>
<desc>An Element to add</desc>
</params>
<desc>Adds a single Element to the set of matched elements. This is used to
add a single Element to a jQuery object.</desc>
<examples>
<code>$("p").add( document.getElementById("a") )</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt;, &lt;span id="a"&gt;Hello Again&lt;/span&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;&lt;span id="a"&gt;Hello Again&lt;/span&gt;&lt;/p&gt;</before>
</examples>
</method>
<method short='Checks the current selection against an expression and returns true,
if the selection fits the given expression.' type='Boolean' name='is' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>The expression with which to filter</desc>
</params>
<desc>Checks the current selection against an expression and returns true,
if the selection fits the given expression. Does return false, if the
selection does not fit or the expression is not valid.</desc>
<tests>ok( $('#form').is('form'), 'Check for element: A form must be a form' );</tests>
<tests>ok( !$('#form').is('div'), 'Check for element: A form is not a div' );</tests>
<tests>ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' );</tests>
<tests>ok( !$('#mark').is('.link'), 'Check for class: Did not expect class "link"' );</tests>
<tests>ok( $('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' );</tests>
<tests>ok( !$('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' );</tests>
<tests>ok( $('#en').is('[@lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' );</tests>
<tests>ok( !$('#en').is('[@lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' );</tests>
<tests>ok( $('#text1').is('[@type="text"]'), 'Check for attribute: Expected attribute type to be "text"' );</tests>
<tests>ok( !$('#text1').is('[@type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' );</tests>
<tests>ok( $('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' );</tests>
<tests>ok( !$('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' );</tests>
<tests>ok( $('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' );</tests>
<tests>ok( !$('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' );</tests>
<tests>ok( $('#foo').is('[p]'), 'Check for child: Expected a child "p" element' );</tests>
<tests>ok( !$('#foo').is('[ul]'), 'Check for child: Did not expect "ul" element' );</tests>
<tests>ok( $('#foo').is('[p][a][code]'), 'Check for childs: Expected "p", "a" and "code" child elements' );</tests>
<tests>ok( !$('#foo').is('[p][a][code][ol]'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' );</tests>
<tests>ok( !$('#foo').is(0), 'Expected false for an invalid expression - 0' );</tests>
<tests>ok( !$('#foo').is(null), 'Expected false for an invalid expression - null' );</tests>
<tests>ok( !$('#foo').is(''), 'Expected false for an invalid expression - ""' );</tests>
<tests>ok( !$('#foo').is(undefined), 'Expected false for an invalid expression - undefined' );</tests>
<examples>
<desc>Returns true, because the parent of the input is a form element</desc>
<before>&lt;form&gt;&lt;input type="checkbox" /&gt;&lt;/form&gt;</before>
<code>$("input[@type='checkbox']").parent().is("form")</code>
<result>true</result>
</examples>
<examples>
<desc>Returns false, because the parent of the input is a p element</desc>
<before>&lt;form&gt;&lt;p&gt;&lt;input type="checkbox" /&gt;&lt;/p&gt;&lt;/form&gt;</before>
<code>$("input[@type='checkbox']").parent().is("form")</code>
<result>false</result>
</examples>
<examples>
<desc>An invalid expression always returns false.</desc>
<before>&lt;form&gt;&lt;/form&gt;</before>
<code>$("form").is(null)</code>
<result>false</result>
</examples>
</method>
<method cat='Core' type='jQuery' short='' private='1' name='domManip'>
<desc></desc>
<params type='Array' name='args'>
<desc></desc>
</params>
<params type='Boolean' name='table'>
<desc></desc>
</params>
<params type='Number' name='int'>
<desc></desc>
</params>
<params type='Function' name='fn'>
<desc>The function doing the DOM manipulation.</desc>
</params>
</method>
<method cat='Core' type='jQuery' short='' private='1' name='pushStack'>
<desc></desc>
<params type='Array' name='a'>
<desc></desc>
</params>
<params type='Array' name='args'>
<desc></desc>
</params>
</method>
<method cat='Core' type='Object' short='Extends the jQuery object itself.' private='1' name='extend'>
<desc>Extends the jQuery object itself. Can be used to add both static
functions and plugin methods.</desc>
<params type='Object' name='obj'>
<desc></desc>
</params>
<examples>
<desc>Adds two plugin methods.</desc>
<code>$.fn.extend({
  check: function() {
    this.each(function() { this.checked = true; });
  ),
  uncheck: function() {
    this.each(function() { this.checked = false; });
  }
});
$("input[@type=checkbox]").check();
$("input[@type=radio]").uncheck();</code>
</examples>
</method>
<method short='Extend one object with another, returning the original,
modified, object.' type='Object' name='$.extend' cat='Javascript'>
<params type='Object' name='obj'>
<desc>The object to extend</desc>
</params>
<params type='Object' name='prop'>
<desc>The object that will be merged into the first.</desc>
</params>
<desc>Extend one object with another, returning the original,
modified, object. This is a great utility for simple inheritance.</desc>
<tests>var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" };
var options =     { xnumber2: 1, xstring2: "x", xxx: "newstring" };
var optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" };
var merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "x", xxx: "newstring" };
jQuery.extend(settings, options);
isSet( settings, merged, "Check if extended: settings must be extended" );
isSet ( options, optionsCopy, "Check if not modified: options must not be modified" );</tests>
<examples>
<code>var settings = { validate: false, limit: 5, name: "foo" };
var options = { validate: true, name: "bar" };
jQuery.extend(settings, options);</code>
<result>settings == { validate: true, limit: 5, name: "bar" }</result>
</examples>
</method>
<method cat='Core' type='undefined' short='' private='1' name='init'>
<desc></desc>
</method>
<method short='A generic iterator function, which can be used to seemlessly
iterate over both objects and arrays.' type='Object' name='$.each' cat='Javascript'>
<params type='Object' name='obj'>
<desc>The object, or array, to iterate over.</desc>
</params>
<params type='Function' name='fn'>
<desc>The function that will be executed on every object.</desc>
</params>
<desc>A generic iterator function, which can be used to seemlessly
iterate over both objects and arrays. This function is not the same
as $().each() - which is used to iterate, exclusively, over a jQuery
object. This function can be used to iterate over anything.</desc>
<examples>
<desc>This is an example of iterating over the items in an array, accessing both the current item and its index.</desc>
<code>$.each( [0,1,2], function(i){
  alert( "Item #" + i + ": " + this );
});</code>
</examples>
<examples>
<desc>This is an example of iterating over the properties in an Object, accessing both the current item and its key.</desc>
<code>$.each( { name: "John", lang: "JS" }, function(i){
  alert( "Name: " + i + ", Value: " + this );
});</code>
</examples>
</method>
<method cat='Core' type='Array&lt;Element&gt;' short='' private='1' name='$.find'>
<desc></desc>
<tests>t( "Element Selector", "div", ["main","foo"] );</tests>
<tests>t( "Element Selector", "body", ["body"] );</tests>
<tests>t( "Element Selector", "html", ["html"] );</tests>
<tests>ok( $("*").size() &gt;= 30, "Element Selector" );</tests>
<tests>t( "Parent Element", "div div", ["foo"] );</tests>
<tests>t( "ID Selector", "#body", ["body"] );</tests>
<tests>t( "ID Selector w/ Element", "body#body", ["body"] );</tests>
<tests>t( "ID Selector w/ Element", "ul#first", [] );</tests>
<tests>t( "Class Selector", ".blog", ["mark","simon"] );</tests>
<tests>t( "Class Selector", ".blog.link", ["simon"] );</tests>
<tests>t( "Class Selector w/ Element", "a.blog", ["mark","simon"] );</tests>
<tests>t( "Parent Class Selector", "p .blog", ["mark","simon"] );</tests>
<tests>t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] );</tests>
<tests>t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] );</tests>
<tests>t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] );</tests>
<tests>t( "Comma Support", "a.blog,div", ["mark","simon","main","foo"] );</tests>
<tests>t( "Child", "p &gt; a", ["simon1","google","groups","mark","yahoo","simon"] );</tests>
<tests>t( "Child", "p&gt; a", ["simon1","google","groups","mark","yahoo","simon"] );</tests>
<tests>t( "Child", "p &gt;a", ["simon1","google","groups","mark","yahoo","simon"] );</tests>
<tests>t( "Child", "p&gt;a", ["simon1","google","groups","mark","yahoo","simon"] );</tests>
<tests>t( "Child w/ Class", "p &gt; a.blog", ["mark","simon"] );</tests>
<tests>t( "All Children", "code &gt; *", ["anchor1","anchor2"] );</tests>
<tests>t( "All Grandchildren", "p &gt; * &gt; *", ["anchor1","anchor2"] );</tests>
<tests>t( "Adjacent", "a + a", ["groups"] );</tests>
<tests>t( "Adjacent", "a +a", ["groups"] );</tests>
<tests>t( "Adjacent", "a+ a", ["groups"] );</tests>
<tests>t( "Adjacent", "a+a", ["groups"] );</tests>
<tests>t( "Adjacent", "p + p", ["ap","en","sap"] );</tests>
<tests>t( "Comma, Child, and Adjacent", "a + a, code &gt; a", ["groups","anchor1","anchor2"] );</tests>
<tests>t( "First Child", "p:first-child", ["firstp","sndp"] );</tests>
<tests>t( "Attribute Exists", "a[@title]", ["google"] );</tests>
<tests>t( "Attribute Exists", "*[@title]", ["google"] );</tests>
<tests>t( "Attribute Exists", "[@title]", ["google"] );</tests>
<tests>t( "Non-existing part of attribute [@name*=bla]", "[@name*=bla]", [] );</tests>
<tests>t( "Non-existing start of attribute [@name^=bla]", "[@name^=bla]", [] );</tests>
<tests>t( "Non-existing end of attribute [@name$=bla]", "[@name$=bla]", [] );</tests>
<tests>t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] );</tests>
<tests>t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1"] );</tests>
<tests>t( "Attribute Equals", "a[@rel=bookmark]", ["simon1"] );</tests>
<tests>t( "Multiple Attribute Equals", "input[@type='hidden'],input[@type='radio']", ["hidden1","radio1","radio2"] );</tests>
<tests>t( "Multiple Attribute Equals", "input[@type=\"hidden\"],input[@type='radio']", ["hidden1","radio1","radio2"] );</tests>
<tests>t( "Multiple Attribute Equals", "input[@type=hidden],input[@type=radio]", ["hidden1","radio1","radio2"] );</tests>
<tests>t( "Attribute Begins With", "a[@href ^= 'http://www']", ["google","yahoo"] );</tests>
<tests>t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] );</tests>
<tests>t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] );</tests>
<tests>t( "First Child", "p:first-child", ["firstp","sndp"] );</tests>
<tests>t( "Last Child", "p:last-child", ["sap"] );</tests>
<tests>t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] );</tests>
<tests>t( "Empty", "ul:empty", ["firstUL"] );</tests>
<tests>t( "Enabled UI Element", "input:enabled", ["text1","radio1","radio2","check1","check2","hidden1","hidden2","name"] );</tests>
<tests>t( "Disabled UI Element", "input:disabled", ["text2"] );</tests>
<tests>t( "Checked UI Element", "input:checked", ["radio2","check1"] );</tests>
<tests>t( "Selected Option Element", "option:selected", ["option1a","option2d","option3b","option3c"] );</tests>
<tests>t( "Text Contains", "a:contains('Google')", ["google","groups"] );</tests>
<tests>t( "Text Contains", "a:contains('Google Groups')", ["groups"] );</tests>
<tests>t( "Element Preceded By", "p ~ div", ["foo"] );</tests>
<tests>t( "Not", "a.blog:not(.link)", ["mark"] );</tests>
<tests>ok( jQuery.find("//*").length &gt;= 30, "All Elements (//*)" );</tests>
<tests>t( "All Div Elements", "//div", ["main","foo"] );</tests>
<tests>t( "Absolute Path", "/html/body", ["body"] );</tests>
<tests>t( "Absolute Path w/ *", "/* /body", ["body"] );</tests>
<tests>t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] );</tests>
<tests>t( "Absolute and Relative Paths", "/html//div", ["main","foo"] );</tests>
<tests>t( "All Children, Explicit", "//code/*", ["anchor1","anchor2"] );</tests>
<tests>t( "All Children, Implicit", "//code/", ["anchor1","anchor2"] );</tests>
<tests>t( "Attribute Exists", "//a[@title]", ["google"] );</tests>
<tests>t( "Attribute Equals", "//a[@rel='bookmark']", ["simon1"] );</tests>
<tests>t( "Parent Axis", "//p/..", ["main","foo"] );</tests>
<tests>t( "Sibling Axis", "//p/../", ["firstp","ap","foo","first","firstUL","empty","form","sndp","en","sap"] );</tests>
<tests>t( "Sibling Axis", "//p/../*", ["firstp","ap","foo","first","firstUL","empty","form","sndp","en","sap"] );</tests>
<tests>t( "Has Children", "//p[a]", ["firstp","ap","en","sap"] );</tests>
<tests>t( "nth Element", "p:nth(1)", ["ap"] );</tests>
<tests>t( "First Element", "p:first", ["firstp"] );</tests>
<tests>t( "Last Element", "p:last", ["first"] );</tests>
<tests>t( "Even Elements", "p:even", ["firstp","sndp","sap"] );</tests>
<tests>t( "Odd Elements", "p:odd", ["ap","en","first"] );</tests>
<tests>t( "Position Equals", "p:eq(1)", ["ap"] );</tests>
<tests>t( "Position Greater Than", "p:gt(0)", ["ap","sndp","en","sap","first"] );</tests>
<tests>t( "Position Less Than", "p:lt(3)", ["firstp","ap","sndp"] );</tests>
<tests>t( "Is A Parent", "p:parent", ["firstp","ap","sndp","en","sap","first"] );</tests>
<tests>t( "Is Visible", "input:visible", ["text1","text2","radio1","radio2","check1","check2","name"] );</tests>
<tests>t( "Is Hidden", "input:hidden", ["hidden1","hidden2"] );</tests>
<tests>t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] );</tests>
<tests>t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"]  );</tests>
<tests>t( "All Children of ID with no children", "#firstUL/*", []  );</tests>
<tests>t( ":not() Existing attribute", "input:not([@name])", ["text2", "check2"]);</tests>
<tests>t( ":not() Equals attribute", "select:not([@name=select1])", ["select2", "select3"]);</tests>
<tests>t( ":not() Equals quoted attribute", "select:not([@name='select1'])", ["select2", "select3"]);</tests>
</method>
<method short='Remove the whitespace from the beginning and end of a string.' type='String' name='$.trim' cat='Javascript'>
<params type='String' name='str'>
<desc>The string to trim.</desc>
</params>
<desc>Remove the whitespace from the beginning and end of a string.</desc>
<examples>
<code>$.trim("  hello, how are you?  ");</code>
<result>"hello, how are you?"</result>
</examples>
</method>
<method cat='DOM/Traversing' type='Array&lt;Element&gt;' short='All ancestors of a given element.' private='1' name='$.parents'>
<desc>All ancestors of a given element.</desc>
<params type='Element' name='elem'>
<desc>The element to find the ancestors of.</desc>
</params>
</method>
<method cat='DOM/Traversing' type='Array' short='All elements on a specified axis.' private='1' name='$.sibling'>
<desc>All elements on a specified axis.</desc>
<params type='Element' name='elem'>
<desc>The element to find all the siblings of (including itself).</desc>
</params>
</method>
<method short='Merge two arrays together, removing all duplicates.' type='Array' name='$.merge' cat='Javascript'>
<params type='Array' name='first'>
<desc>The first array to merge.</desc>
</params>
<params type='Array' name='second'>
<desc>The second array to merge.</desc>
</params>
<desc>Merge two arrays together, removing all duplicates. The final order
or the new array is: All the results from the first array, followed
by the unique results from the second array.</desc>
<examples>
<code>$.merge( [0,1,2], [2,3,4] )</code>
<result>[0,1,2,3,4]</result>
</examples>
<examples>
<code>$.merge( [3,2,1], [4,3,2] )</code>
<result>[3,2,1,4]</result>
</examples>
</method>
<method short='Filter items out of an array, by using a filter function.' type='Array' name='$.grep' cat='Javascript'>
<params type='Array' name='array'>
<desc>The Array to find items in.</desc>
</params>
<params type='Function' name='fn'>
<desc>The function to process each item against.</desc>
</params>
<params type='Boolean' name='inv'>
<desc>Invert the selection - select the opposite of the function.</desc>
</params>
<desc>Filter items out of an array, by using a filter function.
The specified function will be passed two arguments: The
current array item and the index of the item in the array. The
function should return 'true' if you wish to keep the item in
the array, false if it should be removed.</desc>
<examples>
<code>$.grep( [0,1,2], function(i){
  return i &gt; 0;
});</code>
<result>[1, 2]</result>
</examples>
</method>
<method short='Translate all items in an array to another array of items.' type='Array' name='$.map' cat='Javascript'>
<params type='Array' name='array'>
<desc>The Array to translate.</desc>
</params>
<params type='Function' name='fn'>
<desc>The function to process each item against.</desc>
</params>
<desc>Translate all items in an array to another array of items. 
The translation function that is provided to this method is 
called for each item in the array and is passed one argument: 
The item to be translated. The function can then return:
The translated value, 'null' (to remove the item), or 
an array of values - which will be flattened into the full array.</desc>
<examples>
<code>$.map( [0,1,2], function(i){
  return i + 4;
});</code>
<result>[4, 5, 6]</result>
</examples>
<examples>
<code>$.map( [0,1,2], function(i){
  return i &gt; 0 ? i + 1 : null;
});</code>
<result>[2, 3]</result>
</examples>
<examples>
<code>$.map( [0,1,2], function(i){
  return [ i, i + 1 ];
});</code>
<result>[0, 1, 1, 2, 2, 3]</result>
</examples>
</method>
<method short='Append all of the matched elements to another, specified, set of elements.' type='jQuery' name='appendTo' cat='DOM/Manipulation'>
<params type='String' name='expr'>
<desc>A jQuery expression of elements to match.</desc>
</params>
<desc>Append all of the matched elements to another, specified, set of elements.
This operation is, essentially, the reverse of doing a regular
$(A).append(B), in that instead of appending B to A, you're appending
A to B.</desc>
<examples>
<code>$("p").appendTo("#foo");</code>
<result>&lt;div id="foo"&gt;&lt;p&gt;I would like to say: &lt;/p&gt;&lt;/div&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Prepend all of the matched elements to another, specified, set of elements.' type='jQuery' name='prependTo' cat='DOM/Manipulation'>
<params type='String' name='expr'>
<desc>A jQuery expression of elements to match.</desc>
</params>
<desc>Prepend all of the matched elements to another, specified, set of elements.
This operation is, essentially, the reverse of doing a regular
$(A).prepend(B), in that instead of prepending B to A, you're prepending
A to B.</desc>
<examples>
<code>$("p").prependTo("#foo");</code>
<result>&lt;div id="foo"&gt;&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/div&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Insert all of the matched elements before another, specified, set of elements.' type='jQuery' name='insertBefore' cat='DOM/Manipulation'>
<params type='String' name='expr'>
<desc>A jQuery expression of elements to match.</desc>
</params>
<desc>Insert all of the matched elements before another, specified, set of elements.
This operation is, essentially, the reverse of doing a regular
$(A).before(B), in that instead of inserting B before A, you're inserting
A before B.</desc>
<examples>
<code>$("p").insertBefore("#foo");</code>
<result>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;Hello&lt;/div&gt;</result>
<before>&lt;div id="foo"&gt;Hello&lt;/div&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</before>
</examples>
</method>
<method short='Insert all of the matched elements after another, specified, set of elements.' type='jQuery' name='insertAfter' cat='DOM/Manipulation'>
<params type='String' name='expr'>
<desc>A jQuery expression of elements to match.</desc>
</params>
<desc>Insert all of the matched elements after another, specified, set of elements.
This operation is, essentially, the reverse of doing a regular
$(A).after(B), in that instead of inserting B after A, you're inserting
A after B.</desc>
<examples>
<code>$("p").insertAfter("#foo");</code>
<result>&lt;div id="foo"&gt;Hello&lt;/div&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</result>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;Hello&lt;/div&gt;</before>
</examples>
</method>
<method short='Get the current CSS width of the first matched element.' type='String' name='width' cat='CSS'>
<desc>Get the current CSS width of the first matched element.</desc>
<examples>
<code>$("p").width();</code>
<result>"300px"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS width of every matched element.' type='jQuery' name='width' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS width of every matched element. Be sure to include
the "px" (or other unit of measurement) after the number that you
specify, otherwise you might get strange results.</desc>
<examples>
<code>$("p").width("20px");</code>
<result>&lt;p style="width:20px;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS height of the first matched element.' type='String' name='height' cat='CSS'>
<desc>Get the current CSS height of the first matched element.</desc>
<examples>
<code>$("p").height();</code>
<result>"14px"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS height of every matched element.' type='jQuery' name='height' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS height of every matched element. Be sure to include
the "px" (or other unit of measurement) after the number that you
specify, otherwise you might get strange results.</desc>
<examples>
<code>$("p").height("20px");</code>
<result>&lt;p style="height:20px;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS top of the first matched element.' type='String' name='top' cat='CSS'>
<desc>Get the current CSS top of the first matched element.</desc>
<examples>
<code>$("p").top();</code>
<result>"0px"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS top of every matched element.' type='jQuery' name='top' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS top of every matched element. Be sure to include
the "px" (or other unit of measurement) after the number that you
specify, otherwise you might get strange results.</desc>
<examples>
<code>$("p").top("20px");</code>
<result>&lt;p style="top:20px;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS left of the first matched element.' type='String' name='left' cat='CSS'>
<desc>Get the current CSS left of the first matched element.</desc>
<examples>
<code>$("p").left();</code>
<result>"0px"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS left of every matched element.' type='jQuery' name='left' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS left of every matched element. Be sure to include
the "px" (or other unit of measurement) after the number that you
specify, otherwise you might get strange results.</desc>
<examples>
<code>$("p").left("20px");</code>
<result>&lt;p style="left:20px;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS position of the first matched element.' type='String' name='position' cat='CSS'>
<desc>Get the current CSS position of the first matched element.</desc>
<examples>
<code>$("p").position();</code>
<result>"static"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS position of every matched element.' type='jQuery' name='position' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS position of every matched element.</desc>
<examples>
<code>$("p").position("relative");</code>
<result>&lt;p style="position:relative;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS float of the first matched element.' type='String' name='float' cat='CSS'>
<desc>Get the current CSS float of the first matched element.</desc>
<examples>
<code>$("p").float();</code>
<result>"none"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS float of every matched element.' type='jQuery' name='float' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS float of every matched element.</desc>
<examples>
<code>$("p").float("left");</code>
<result>&lt;p style="float:left;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS overflow of the first matched element.' type='String' name='overflow' cat='CSS'>
<desc>Get the current CSS overflow of the first matched element.</desc>
<examples>
<code>$("p").overflow();</code>
<result>"none"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS overflow of every matched element.' type='jQuery' name='overflow' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS overflow of every matched element.</desc>
<examples>
<code>$("p").overflow("auto");</code>
<result>&lt;p style="overflow:auto;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS color of the first matched element.' type='String' name='color' cat='CSS'>
<desc>Get the current CSS color of the first matched element.</desc>
<examples>
<code>$("p").color();</code>
<result>"black"</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS color of every matched element.' type='jQuery' name='color' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS color of every matched element.</desc>
<examples>
<code>$("p").color("blue");</code>
<result>&lt;p style="color:blue;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current CSS background of the first matched element.' type='String' name='background' cat='CSS'>
<desc>Get the current CSS background of the first matched element.</desc>
<examples>
<code>$("p").background();</code>
<result>"blue"</result>
<before>&lt;p style="background:blue;"&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Set the CSS background of every matched element.' type='jQuery' name='background' cat='CSS'>
<params type='String' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<desc>Set the CSS background of every matched element.</desc>
<examples>
<code>$("p").background("blue");</code>
<result>&lt;p style="background:blue;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method>
<method short='Reduce the set of matched elements to a single element.' type='jQuery' name='eq' cat='Core'>
<params type='Number' name='pos'>
<desc>The index of the element that you wish to limit to.</desc>
</params>
<desc>Reduce the set of matched elements to a single element.
The position of the element in the set of matched elements
starts at 0 and goes to length - 1.</desc>
<examples>
<code>$("p").eq(1)</code>
<result>[ &lt;p&gt;So is this&lt;/p&gt; ]</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before>
</examples>
</method>
<method short='Reduce the set of matched elements to all elements before a given position.' type='jQuery' name='lt' cat='Core'>
<params type='Number' name='pos'>
<desc>Reduce the set to all elements below this position.</desc>
</params>
<desc>Reduce the set of matched elements to all elements before a given position.
The position of the element in the set of matched elements
starts at 0 and goes to length - 1.</desc>
<examples>
<code>$("p").lt(1)</code>
<result>[ &lt;p&gt;This is just a test.&lt;/p&gt; ]</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before>
</examples>
</method>
<method short='Reduce the set of matched elements to all elements after a given position.' type='jQuery' name='gt' cat='Core'>
<params type='Number' name='pos'>
<desc>Reduce the set to all elements after this position.</desc>
</params>
<desc>Reduce the set of matched elements to all elements after a given position.
The position of the element in the set of matched elements
starts at 0 and goes to length - 1.</desc>
<examples>
<code>$("p").gt(0)</code>
<result>[ &lt;p&gt;So is this&lt;/p&gt; ]</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before>
</examples>
</method>
<method short='Filter the set of elements to those that contain the specified text.' type='jQuery' name='contains' cat='DOM/Traversing'>
<params type='String' name='str'>
<desc>The string that will be contained within the text of an element.</desc>
</params>
<desc>Filter the set of elements to those that contain the specified text.</desc>
<examples>
<code>$("p").contains("test")</code>
<result>[ &lt;p&gt;This is just a test.&lt;/p&gt; ]</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before>
</examples>
</method>
<method short='Get the current value of the first matched element.' type='String' name='val' cat='DOM/Attributes'>
<desc>Get the current value of the first matched element.</desc>
<tests>ok( $("#text1").val() == "Test", "Check for value of input element" );</tests>
<tests>ok( !$("#text1").val() == "", "Check for value of input element" );</tests>
<examples>
<code>$("input").val();</code>
<result>"some text"</result>
<before>&lt;input type="text" value="some text"/&gt;</before>
</examples>
</method>
<method short='Set the value of every matched element.' type='jQuery' name='val' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the value of every matched element.</desc>
<tests>document.getElementById('text1').value = "bla";
ok( $("#text1").val() == "bla", "Check for modified value of input element" );
$("#text1").val('test');
ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" );</tests>
<examples>
<code>$("input").value("test");</code>
<result>&lt;input type="text" value="test"/&gt;</result>
<before>&lt;input type="text" value="some text"/&gt;</before>
</examples>
</method>
<method short='Get the html contents of the first matched element.' type='String' name='html' cat='DOM/Attributes'>
<desc>Get the html contents of the first matched element.</desc>
<examples>
<code>$("div").html();</code>
<result>&lt;input/&gt;</result>
<before>&lt;div&gt;&lt;input/&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Set the html contents of every matched element.' type='jQuery' name='html' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the html contents to the specified value.</desc>
</params>
<desc>Set the html contents of every matched element.</desc>
<tests>var div = $("div");
div.html("&lt;b&gt;test&lt;/b&gt;");
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
  if ( div.get(i).childNodes.length == 0 ) pass = false;
}
ok( pass, "Set HTML" );</tests>
<examples>
<code>$("div").html("&lt;b&gt;new stuff&lt;/b&gt;");</code>
<result>&lt;div&gt;&lt;b&gt;new stuff&lt;/b&gt;&lt;/div&gt;</result>
<before>&lt;div&gt;&lt;input/&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Get the current id of the first matched element.' type='String' name='id' cat='DOM/Attributes'>
<desc>Get the current id of the first matched element.</desc>
<examples>
<code>$("input").id();</code>
<result>"test"</result>
<before>&lt;input type="text" id="test" value="some text"/&gt;</before>
</examples>
</method>
<method short='Set the id of every matched element.' type='jQuery' name='id' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the id of every matched element.</desc>
<examples>
<code>$("input").id("newid");</code>
<result>&lt;input type="text" id="newid" value="some text"/&gt;</result>
<before>&lt;input type="text" id="test" value="some text"/&gt;</before>
</examples>
</method>
<method short='Get the current title of the first matched element.' type='String' name='title' cat='DOM/Attributes'>
<desc>Get the current title of the first matched element.</desc>
<examples>
<code>$("img").title();</code>
<result>"my image"</result>
<before>&lt;img src="test.jpg" title="my image"/&gt;</before>
</examples>
</method>
<method short='Set the title of every matched element.' type='jQuery' name='title' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the title of every matched element.</desc>
<examples>
<code>$("img").title("new title");</code>
<result>&lt;img src="test.jpg" title="new image"/&gt;</result>
<before>&lt;img src="test.jpg" title="my image"/&gt;</before>
</examples>
</method>
<method short='Get the current name of the first matched element.' type='String' name='name' cat='DOM/Attributes'>
<desc>Get the current name of the first matched element.</desc>
<examples>
<code>$("input").name();</code>
<result>"username"</result>
<before>&lt;input type="text" name="username"/&gt;</before>
</examples>
</method>
<method short='Set the name of every matched element.' type='jQuery' name='name' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the name of every matched element.</desc>
<examples>
<code>$("input").name("user");</code>
<result>&lt;input type="text" name="user"/&gt;</result>
<before>&lt;input type="text" name="username"/&gt;</before>
</examples>
</method>
<method short='Get the current href of the first matched element.' type='String' name='href' cat='DOM/Attributes'>
<desc>Get the current href of the first matched element.</desc>
<examples>
<code>$("a").href();</code>
<result>"test.html"</result>
<before>&lt;a href="test.html"&gt;my link&lt;/a&gt;</before>
</examples>
</method>
<method short='Set the href of every matched element.' type='jQuery' name='href' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the href of every matched element.</desc>
<examples>
<code>$("a").href("test2.html");</code>
<result>&lt;a href="test2.html"&gt;my link&lt;/a&gt;</result>
<before>&lt;a href="test.html"&gt;my link&lt;/a&gt;</before>
</examples>
</method>
<method short='Get the current src of the first matched element.' type='String' name='src' cat='DOM/Attributes'>
<desc>Get the current src of the first matched element.</desc>
<examples>
<code>$("img").src();</code>
<result>"test.jpg"</result>
<before>&lt;img src="test.jpg" title="my image"/&gt;</before>
</examples>
</method>
<method short='Set the src of every matched element.' type='jQuery' name='src' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the src of every matched element.</desc>
<examples>
<code>$("img").src("test2.jpg");</code>
<result>&lt;img src="test2.jpg" title="my image"/&gt;</result>
<before>&lt;img src="test.jpg" title="my image"/&gt;</before>
</examples>
</method>
<method short='Get the current rel of the first matched element.' type='String' name='rel' cat='DOM/Attributes'>
<desc>Get the current rel of the first matched element.</desc>
<examples>
<code>$("a").rel();</code>
<result>"nofollow"</result>
<before>&lt;a href="test.html" rel="nofollow"&gt;my link&lt;/a&gt;</before>
</examples>
</method>
<method short='Set the rel of every matched element.' type='jQuery' name='rel' cat='DOM/Attributes'>
<params type='String' name='val'>
<desc>Set the property to the specified value.</desc>
</params>
<desc>Set the rel of every matched element.</desc>
<examples>
<code>$("a").rel("nofollow");</code>
<result>&lt;a href="test.html" rel="nofollow"&gt;my link&lt;/a&gt;</result>
<before>&lt;a href="test.html"&gt;my link&lt;/a&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique parents of the matched
set of elements.' type='jQuery' name='parent' cat='DOM/Traversing'>
<desc>Get a set of elements containing the unique parents of the matched
set of elements.</desc>
<examples>
<code>$("p").parent()</code>
<result>[ &lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt; ]</result>
<before>&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique parents of the matched
set of elements, and filtered by an expression.' type='jQuery' name='parent' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the parents with</desc>
</params>
<desc>Get a set of elements containing the unique parents of the matched
set of elements, and filtered by an expression.</desc>
<examples>
<code>$("p").parent(".selected")</code>
<result>[ &lt;div class="selected"&gt;&lt;p&gt;Hello Again&lt;/p&gt;&lt;/div&gt; ]</result>
<before>&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;&lt;div class="selected"&gt;&lt;p&gt;Hello Again&lt;/p&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique ancestors of the matched
set of elements (except for the root element).' type='jQuery' name='ancestors' cat='DOM/Traversing'>
<desc>Get a set of elements containing the unique ancestors of the matched
set of elements (except for the root element).</desc>
<examples>
<code>$("span").ancestors()</code>
<result>[ &lt;body&gt;...&lt;/body&gt;, &lt;div&gt;...&lt;/div&gt;, &lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt; ]</result>
<before>&lt;html&gt;&lt;body&gt;&lt;div&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique ancestors of the matched
set of elements, and filtered by an expression.' type='jQuery' name='ancestors' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the ancestors with</desc>
</params>
<desc>Get a set of elements containing the unique ancestors of the matched
set of elements, and filtered by an expression.</desc>
<examples>
<code>$("span").ancestors("p")</code>
<result>[ &lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt; ]</result>
<before>&lt;html&gt;&lt;body&gt;&lt;div&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique ancestors of the matched
set of elements (except for the root element).' type='jQuery' name='parents' cat='DOM/Traversing'>
<desc>Get a set of elements containing the unique ancestors of the matched
set of elements (except for the root element).</desc>
<examples>
<code>$("span").ancestors()</code>
<result>[ &lt;body&gt;...&lt;/body&gt;, &lt;div&gt;...&lt;/div&gt;, &lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt; ]</result>
<before>&lt;html&gt;&lt;body&gt;&lt;div&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique ancestors of the matched
set of elements, and filtered by an expression.' type='jQuery' name='parents' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the ancestors with</desc>
</params>
<desc>Get a set of elements containing the unique ancestors of the matched
set of elements, and filtered by an expression.</desc>
<examples>
<code>$("span").ancestors("p")</code>
<result>[ &lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt; ]</result>
<before>&lt;html&gt;&lt;body&gt;&lt;div&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique next siblings of each of the
matched set of elements.' type='jQuery' name='next' cat='DOM/Traversing'>
<desc>Get a set of elements containing the unique next siblings of each of the
matched set of elements.

It only returns the very next sibling, not all next siblings.</desc>
<examples>
<code>$("p").next()</code>
<result>[ &lt;p&gt;Hello Again&lt;/p&gt;, &lt;div&gt;&lt;span&gt;And Again&lt;/span&gt;&lt;/div&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;Hello Again&lt;/p&gt;&lt;div&gt;&lt;span&gt;And Again&lt;/span&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique next siblings of each of the
matched set of elements, and filtered by an expression.' type='jQuery' name='next' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the next Elements with</desc>
</params>
<desc>Get a set of elements containing the unique next siblings of each of the
matched set of elements, and filtered by an expression.

It only returns the very next sibling, not all next siblings.</desc>
<examples>
<code>$("p").next(".selected")</code>
<result>[ &lt;p class="selected"&gt;Hello Again&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;&lt;div&gt;&lt;span&gt;And Again&lt;/span&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique previous siblings of each of the
matched set of elements.' type='jQuery' name='prev' cat='DOM/Traversing'>
<desc>Get a set of elements containing the unique previous siblings of each of the
matched set of elements.

It only returns the immediately previous sibling, not all previous siblings.</desc>
<examples>
<code>$("p").previous()</code>
<result>[ &lt;div&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;div&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing the unique previous siblings of each of the
matched set of elements, and filtered by an expression.' type='jQuery' name='prev' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the previous Elements with</desc>
</params>
<desc>Get a set of elements containing the unique previous siblings of each of the
matched set of elements, and filtered by an expression.

It only returns the immediately previous sibling, not all previous siblings.</desc>
<examples>
<code>$("p").previous(".selected")</code>
<result>[ &lt;div&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/div&gt; ]</result>
<before>&lt;div&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/div&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing all of the unique siblings of each of the
matched set of elements.' type='jQuery' name='siblings' cat='DOM/Traversing'>
<desc>Get a set of elements containing all of the unique siblings of each of the
matched set of elements.</desc>
<tests>isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" );</tests>
<examples>
<code>$("div").siblings()</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt;, &lt;p&gt;And Again&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;div&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing all of the unique siblings of each of the
matched set of elements, and filtered by an expression.' type='jQuery' name='siblings' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the sibling Elements with</desc>
</params>
<desc>Get a set of elements containing all of the unique siblings of each of the
matched set of elements, and filtered by an expression.</desc>
<tests>isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" );</tests>
<tests>isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );</tests>
<examples>
<code>$("div").siblings(".selected")</code>
<result>[ &lt;p class="selected"&gt;Hello Again&lt;/p&gt; ]</result>
<before>&lt;div&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/div&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing all of the unique children of each of the
matched set of elements.' type='jQuery' name='children' cat='DOM/Traversing'>
<desc>Get a set of elements containing all of the unique children of each of the
matched set of elements.</desc>
<examples>
<code>$("div").children()</code>
<result>[ &lt;span&gt;Hello Again&lt;/span&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;div&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Get a set of elements containing all of the unique children of each of the
matched set of elements, and filtered by an expression.' type='jQuery' name='children' cat='DOM/Traversing'>
<params type='String' name='expr'>
<desc>An expression to filter the child Elements with</desc>
</params>
<desc>Get a set of elements containing all of the unique children of each of the
matched set of elements, and filtered by an expression.</desc>
<examples>
<code>$("div").children(".selected")</code>
<result>[ &lt;p class="selected"&gt;Hello Again&lt;/p&gt; ]</result>
<before>&lt;div&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;&lt;p&gt;And Again&lt;/p&gt;&lt;/div&gt;</before>
</examples>
</method>
<method short='Remove an attribute from each of the matched elements.' type='jQuery' name='removeAttr' cat='DOM'>
<params type='String' name='name'>
<desc>The name of the attribute to remove.</desc>
</params>
<desc>Remove an attribute from each of the matched elements.</desc>
<examples>
<code>$("input").removeAttr("disabled")</code>
<result>&lt;input/&gt;</result>
<before>&lt;input disabled="disabled"/&gt;</before>
</examples>
</method>
<method short='Displays each of the set of matched elements if they are hidden.' type='jQuery' name='show' cat='Effects'>
<desc>Displays each of the set of matched elements if they are hidden.</desc>
<tests>var pass = true, div = $("div");
div.show().each(function(){
  if ( this.style.display == "none" ) pass = false;
});
ok( pass, "Show" );</tests>
<examples>
<code>$("p").show()</code>
<result>[ &lt;p style="display: block"&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p style="display: none"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Hides each of the set of matched elements if they are shown.' type='jQuery' name='hide' cat='Effects'>
<desc>Hides each of the set of matched elements if they are shown.</desc>
<examples>
<code>$("p").hide()</code>
<result>[ &lt;p style="display: none"&gt;Hello&lt;/p&gt; ]

var pass = true, div = $("div");
div.hide().each(function(){
  if ( this.style.display != "none" ) pass = false;
});
ok( pass, "Hide" );</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Toggles each of the set of matched elements.' type='jQuery' name='toggle' cat='Effects'>
<desc>Toggles each of the set of matched elements. If they are shown,
toggle makes them hidden. If they are hidden, toggle
makes them shown.</desc>
<examples>
<code>$("p").toggle()</code>
<result>[ &lt;p style="display: none"&gt;Hello&lt;/p&gt;, &lt;p style="display: block"&gt;Hello Again&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p style="display: none"&gt;Hello Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Adds the specified class to each of the set of matched elements.' type='jQuery' name='addClass' cat='DOM'>
<params type='String' name='class'>
<desc>A CSS class to add to the elements</desc>
</params>
<desc>Adds the specified class to each of the set of matched elements.</desc>
<tests>var div = $("div");
div.addClass("test");
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
 if ( div.get(i).className.indexOf("test") == -1 ) pass = false;
}
ok( pass, "Add Class" );</tests>
<examples>
<code>$("p").addClass("selected")</code>
<result>[ &lt;p class="selected"&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes the specified class from the set of matched elements.' type='jQuery' name='removeClass' cat='DOM'>
<params type='String' name='class'>
<desc>A CSS class to remove from the elements</desc>
</params>
<desc>Removes the specified class from the set of matched elements.</desc>
<tests>var div = $("div").addClass("test");
div.removeClass("test");
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
 if ( div.get(i).className.indexOf("test") != -1 ) pass = false;
}
ok( pass, "Remove Class" );</tests>
<examples>
<code>$("p").removeClass("selected")</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p class="selected"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Adds the specified class if it is present, removes it if it is
not present.' type='jQuery' name='toggleClass' cat='DOM'>
<params type='String' name='class'>
<desc>A CSS class with which to toggle the elements</desc>
</params>
<desc>Adds the specified class if it is present, removes it if it is
not present.</desc>
<examples>
<code>$("p").toggleClass("selected")</code>
<result>[ &lt;p class="selected"&gt;Hello&lt;/p&gt;, &lt;p&gt;Hello Again&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all matched elements from the DOM.' type='jQuery' name='remove' cat='DOM/Manipulation'>
<desc>Removes all matched elements from the DOM. This does NOT remove them from the
jQuery object, allowing you to use the matched elements further.</desc>
<examples>
<code>$("p").remove();</code>
<result>how are</result>
<before>&lt;p&gt;Hello&lt;/p&gt; how are &lt;p&gt;you?&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes only elements (out of the list of matched elements) that match
the specified jQuery expression.' type='jQuery' name='remove' cat='DOM/Manipulation'>
<params type='String' name='expr'>
<desc>A jQuery expression to filter elements by.</desc>
</params>
<desc>Removes only elements (out of the list of matched elements) that match
the specified jQuery expression. This does NOT remove them from the
jQuery object, allowing you to use the matched elements further.</desc>
<examples>
<code>$("p").remove(".hello");</code>
<result>how are &lt;p&gt;you?&lt;/p&gt;</result>
<before>&lt;p class="hello"&gt;Hello&lt;/p&gt; how are &lt;p&gt;you?&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all child nodes from the set of matched elements.' type='jQuery' name='empty' cat='DOM/Manipulation'>
<desc>Removes all child nodes from the set of matched elements.</desc>
<examples>
<code>$("p").empty()</code>
<result>[ &lt;p&gt;&lt;/p&gt; ]</result>
<before>&lt;p&gt;Hello, &lt;span&gt;Person&lt;/span&gt; &lt;a href="#"&gt;and person&lt;/a&gt;&lt;/p&gt;</before>
</examples>
</method>
<method short='Binds a handler to a particular event (like click) for each matched element.' type='jQuery' name='bind' cat='Events'>
<params type='String' name='type'>
<desc>An event type</desc>
</params>
<params type='Function' name='fn'>
<desc>A function to bind to the event on each of the set of matched elements</desc>
</params>
<desc>Binds a handler to a particular event (like click) for each matched element.
The event handler is passed an event object that you can use to prevent
default behaviour. To stop both default action and event bubbling, your handler
has to return false.</desc>
<examples>
<code>$("p").bind( "click", function() {
  alert( $(this).text() );
} )</code>
<result>alert("Hello")</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
<examples>
<desc>Cancel a default action and prevent it from bubbling by returning false
from your function.</desc>
<code>$("form").bind( "submit", function() { return false; } )</code>
</examples>
<examples>
<desc>Cancel only the default action by using the preventDefault method.</desc>
<code>$("form").bind( "submit", function(event) {
  event.preventDefault();
} );</code>
</examples>
<examples>
<desc>Stop only an event from bubbling by using the stopPropagation method.</desc>
<code>$("form").bind( "submit", function(event) {
  event.stopPropagation();
} )</code>
</examples>
</method>
<method short='The opposite of bind, removes a bound event from each of the matched
elements.' type='jQuery' name='unbind' cat='Events'>
<params type='String' name='type'>
<desc>An event type</desc>
</params>
<params type='Function' name='fn'>
<desc>A function to unbind from the event on each of the set of matched elements</desc>
</params>
<desc>The opposite of bind, removes a bound event from each of the matched
elements. You must pass the identical function that was used in the original
bind method.</desc>
<examples>
<code>$("p").unbind( "click", function() { alert("Hello"); } )</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p onclick="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound events of a particular type from each of the matched
elements.' type='jQuery' name='unbind' cat='Events'>
<params type='String' name='type'>
<desc>An event type</desc>
</params>
<desc>Removes all bound events of a particular type from each of the matched
elements.</desc>
<examples>
<code>$("p").unbind( "click" )</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p onclick="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound events from each of the matched elements.' type='jQuery' name='unbind' cat='Events'>
<desc>Removes all bound events from each of the matched elements.</desc>
<examples>
<code>$("p").unbind()</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result>
<before>&lt;p onclick="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger a type of event on every matched element.' type='jQuery' name='trigger' cat='Events'>
<params type='String' name='type'>
<desc>An event type to trigger.</desc>
</params>
<desc>Trigger a type of event on every matched element.</desc>
<examples>
<code>$("p").trigger("click")</code>
<result>alert('hello')</result>
<before>&lt;p click="alert('hello')"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Toggle between two function calls every other click.' type='jQuery' name='toggle' cat='Events'>
<params type='Function' name='even'>
<desc>The function to execute on every even click.</desc>
</params>
<params type='Function' name='odd'>
<desc>The function to execute on every odd click.</desc>
</params>
<desc>Toggle between two function calls every other click.
Whenever a matched element is clicked, the first specified function 
is fired, when clicked again, the second is fired. All subsequent 
clicks continue to rotate through the two functions.</desc>
<tests>var count = 0;
var fn1 = function() { count++; }
var fn2 = function() { count--; }
var link = $('#mark');
link.click().toggle(fn1, fn2).click().click().click().click().click();
ok( count == 1, "Check for toggle(fn, fn)" );</tests>
<examples>
<code>$("p").toggle(function(){
  $(this).addClass("selected");
},function(){
  $(this).removeClass("selected");
});</code>
</examples>
</method>
<method short='A method for simulating hovering (moving the mouse on, and off,
an object).' type='jQuery' name='hover' cat='Events'>
<params type='Function' name='over'>
<desc>The function to fire whenever the mouse is moved over a matched element.</desc>
</params>
<params type='Function' name='out'>
<desc>The function to fire whenever the mouse is moved off of a matched element.</desc>
</params>
<desc>A method for simulating hovering (moving the mouse on, and off,
an object). This is a custom method which provides an 'in' to a 
frequent task.

Whenever the mouse cursor is moved over a matched 
element, the first specified function is fired. Whenever the mouse 
moves off of the element, the second specified function fires. 
Additionally, checks are in place to see if the mouse is still within 
the specified element itself (for example, an image inside of a div), 
and if it is, it will continue to 'hover', and not move out 
(a common error in using a mouseout event handler).</desc>
<examples>
<code>$("p").hover(function(){
  $(this).addClass("over");
},function(){
  $(this).addClass("out");
});</code>
</examples>
</method>
<method short='Bind a function to be executed whenever the DOM is ready to be
traversed and manipulated.' type='jQuery' name='ready' cat='Events'>
<params type='Function' name='fn'>
<desc>The function to be executed when the DOM is ready.</desc>
</params>
<desc>Bind a function to be executed whenever the DOM is ready to be
traversed and manipulated. This is probably the most important 
function included in the event module, as it can greatly improve
the response times of your web applications.

In a nutshell, this is a solid replacement for using window.onload, 
and attaching a function to that. By using this method, your bound Function 
will be called the instant the DOM is ready to be read and manipulated, 
which is exactly what 99.99% of all Javascript code needs to run.

Please ensure you have no code in your &lt;body&gt; onload event handler, 
otherwise $(document).ready() may not fire.</desc>
<examples>
<code>$(document).ready(function(){ Your code here... });</code>
</examples>
</method>
<method short='Bind a function to the scroll event of each matched element.' type='jQuery' name='scroll' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the scroll event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the scroll event of each matched element.</desc>
<examples>
<code>$("p").scroll( function() { alert("Hello"); } );</code>
<result>&lt;p onscroll="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the scroll event of each matched element.' type='jQuery' name='scroll' cat='Events/Browser'>
<desc>Trigger the scroll event of each matched element. This causes all of the functions
that have been bound to thet scroll event to be executed.</desc>
<examples>
<code>$("p").scroll();</code>
<result>alert('Hello');</result>
<before>&lt;p onscroll="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the scroll event of each matched element, which will only be executed once.' type='jQuery' name='onescroll' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the scroll event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the scroll event of each matched element, which will only be executed once.
Unlike a call to the normal .scroll() method, calling .onescroll() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onescroll( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first scroll</result>
<before>&lt;p onscroll="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound scroll event from each of the matched
elements.' type='jQuery' name='unscroll' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to unbind from the scroll event on each of the matched elements.</desc>
</params>
<desc>Removes a bound scroll event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unscroll( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onscroll="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound scroll events from each of the matched elements.' type='jQuery' name='unscroll' cat='Events/Browser'>
<desc>Removes all bound scroll events from each of the matched elements.</desc>
<examples>
<code>$("p").unscroll();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onscroll="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the submit event of each matched element.' type='jQuery' name='submit' cat='Events/Form'>
<params type='Function' name='fn'>
<desc>A function to bind to the submit event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the submit event of each matched element.</desc>
<examples>
<code>$("p").submit( function() { alert("Hello"); } );</code>
<result>&lt;p onsubmit="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the submit event of each matched element.' type='jQuery' name='submit' cat='Events/Form'>
<desc>Trigger the submit event of each matched element. This causes all of the functions
that have been bound to thet submit event to be executed.</desc>
<examples>
<code>$("p").submit();</code>
<result>alert('Hello');</result>
<before>&lt;p onsubmit="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the submit event of each matched element, which will only be executed once.' type='jQuery' name='onesubmit' cat='Events/Form'>
<params type='Function' name='fn'>
<desc>A function to bind to the submit event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the submit event of each matched element, which will only be executed once.
Unlike a call to the normal .submit() method, calling .onesubmit() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onesubmit( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first submit</result>
<before>&lt;p onsubmit="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound submit event from each of the matched
elements.' type='jQuery' name='unsubmit' cat='Events/Form'>
<params type='Function' name='fn'>
<desc>A function to unbind from the submit event on each of the matched elements.</desc>
</params>
<desc>Removes a bound submit event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unsubmit( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onsubmit="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound submit events from each of the matched elements.' type='jQuery' name='unsubmit' cat='Events/Form'>
<desc>Removes all bound submit events from each of the matched elements.</desc>
<examples>
<code>$("p").unsubmit();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onsubmit="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the focus event of each matched element.' type='jQuery' name='focus' cat='Events/UI'>
<params type='Function' name='fn'>
<desc>A function to bind to the focus event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the focus event of each matched element.</desc>
<examples>
<code>$("p").focus( function() { alert("Hello"); } );</code>
<result>&lt;p onfocus="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the focus event of each matched element.' type='jQuery' name='focus' cat='Events/UI'>
<desc>Trigger the focus event of each matched element. This causes all of the functions
that have been bound to thet focus event to be executed.</desc>
<examples>
<code>$("p").focus();</code>
<result>alert('Hello');</result>
<before>&lt;p onfocus="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the focus event of each matched element, which will only be executed once.' type='jQuery' name='onefocus' cat='Events/UI'>
<params type='Function' name='fn'>
<desc>A function to bind to the focus event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the focus event of each matched element, which will only be executed once.
Unlike a call to the normal .focus() method, calling .onefocus() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onefocus( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first focus</result>
<before>&lt;p onfocus="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound focus event from each of the matched
elements.' type='jQuery' name='unfocus' cat='Events/UI'>
<params type='Function' name='fn'>
<desc>A function to unbind from the focus event on each of the matched elements.</desc>
</params>
<desc>Removes a bound focus event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unfocus( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onfocus="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound focus events from each of the matched elements.' type='jQuery' name='unfocus' cat='Events/UI'>
<desc>Removes all bound focus events from each of the matched elements.</desc>
<examples>
<code>$("p").unfocus();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onfocus="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the keydown event of each matched element.' type='jQuery' name='keydown' cat='Events/Keyboard'>
<params type='Function' name='fn'>
<desc>A function to bind to the keydown event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the keydown event of each matched element.</desc>
<examples>
<code>$("p").keydown( function() { alert("Hello"); } );</code>
<result>&lt;p onkeydown="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the keydown event of each matched element.' type='jQuery' name='keydown' cat='Events/Keyboard'>
<desc>Trigger the keydown event of each matched element. This causes all of the functions
that have been bound to thet keydown event to be executed.</desc>
<examples>
<code>$("p").keydown();</code>
<result>alert('Hello');</result>
<before>&lt;p onkeydown="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the keydown event of each matched element, which will only be executed once.' type='jQuery' name='onekeydown' cat='Events/Keyboard'>
<params type='Function' name='fn'>
<desc>A function to bind to the keydown event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the keydown event of each matched element, which will only be executed once.
Unlike a call to the normal .keydown() method, calling .onekeydown() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onekeydown( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first keydown</result>
<before>&lt;p onkeydown="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound keydown event from each of the matched
elements.' type='jQuery' name='unkeydown' cat='Events/Keyboard'>
<params type='Function' name='fn'>
<desc>A function to unbind from the keydown event on each of the matched elements.</desc>
</params>
<desc>Removes a bound keydown event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unkeydown( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onkeydown="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound keydown events from each of the matched elements.' type='jQuery' name='unkeydown' cat='Events/Keyboard'>
<desc>Removes all bound keydown events from each of the matched elements.</desc>
<examples>
<code>$("p").unkeydown();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onkeydown="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the dblclick event of each matched element.' type='jQuery' name='dblclick' cat='Events/Mouse'>
<params type='Function' name='fn'>
<desc>A function to bind to the dblclick event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the dblclick event of each matched element.</desc>
<examples>
<code>$("p").dblclick( function() { alert("Hello"); } );</code>
<result>&lt;p ondblclick="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the dblclick event of each matched element.' type='jQuery' name='dblclick' cat='Events/Mouse'>
<desc>Trigger the dblclick event of each matched element. This causes all of the functions
that have been bound to thet dblclick event to be executed.</desc>
<examples>
<code>$("p").dblclick();</code>
<result>alert('Hello');</result>
<before>&lt;p ondblclick="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the dblclick event of each matched element, which will only be executed once.' type='jQuery' name='onedblclick' cat='Events/Mouse'>
<params type='Function' name='fn'>
<desc>A function to bind to the dblclick event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the dblclick event of each matched element, which will only be executed once.
Unlike a call to the normal .dblclick() method, calling .onedblclick() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onedblclick( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first dblclick</result>
<before>&lt;p ondblclick="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound dblclick event from each of the matched
elements.' type='jQuery' name='undblclick' cat='Events/Mouse'>
<params type='Function' name='fn'>
<desc>A function to unbind from the dblclick event on each of the matched elements.</desc>
</params>
<desc>Removes a bound dblclick event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").undblclick( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p ondblclick="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound dblclick events from each of the matched elements.' type='jQuery' name='undblclick' cat='Events/Mouse'>
<desc>Removes all bound dblclick events from each of the matched elements.</desc>
<examples>
<code>$("p").undblclick();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p ondblclick="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the keypress event of each matched element.' type='jQuery' name='keypress' cat='Events/Keyboard'>
<params type='Function' name='fn'>
<desc>A function to bind to the keypress event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the keypress event of each matched element.</desc>
<examples>
<code>$("p").keypress( function() { alert("Hello"); } );</code>
<result>&lt;p onkeypress="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the keypress event of each matched element.' type='jQuery' name='keypress' cat='Events/Keyboard'>
<desc>Trigger the keypress event of each matched element. This causes all of the functions
that have been bound to thet keypress event to be executed.</desc>
<examples>
<code>$("p").keypress();</code>
<result>alert('Hello');</result>
<before>&lt;p onkeypress="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the keypress event of each matched element, which will only be executed once.' type='jQuery' name='onekeypress' cat='Events/Keyboard'>
<params type='Function' name='fn'>
<desc>A function to bind to the keypress event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the keypress event of each matched element, which will only be executed once.
Unlike a call to the normal .keypress() method, calling .onekeypress() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onekeypress( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first keypress</result>
<before>&lt;p onkeypress="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound keypress event from each of the matched
elements.' type='jQuery' name='unkeypress' cat='Events/Keyboard'>
<params type='Function' name='fn'>
<desc>A function to unbind from the keypress event on each of the matched elements.</desc>
</params>
<desc>Removes a bound keypress event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unkeypress( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onkeypress="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound keypress events from each of the matched elements.' type='jQuery' name='unkeypress' cat='Events/Keyboard'>
<desc>Removes all bound keypress events from each of the matched elements.</desc>
<examples>
<code>$("p").unkeypress();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onkeypress="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the error event of each matched element.' type='jQuery' name='error' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the error event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the error event of each matched element.</desc>
<examples>
<code>$("p").error( function() { alert("Hello"); } );</code>
<result>&lt;p onerror="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the error event of each matched element.' type='jQuery' name='error' cat='Events/Browser'>
<desc>Trigger the error event of each matched element. This causes all of the functions
that have been bound to thet error event to be executed.</desc>
<examples>
<code>$("p").error();</code>
<result>alert('Hello');</result>
<before>&lt;p onerror="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the error event of each matched element, which will only be executed once.' type='jQuery' name='oneerror' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the error event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the error event of each matched element, which will only be executed once.
Unlike a call to the normal .error() method, calling .oneerror() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").oneerror( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first error</result>
<before>&lt;p onerror="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound error event from each of the matched
elements.' type='jQuery' name='unerror' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to unbind from the error event on each of the matched elements.</desc>
</params>
<desc>Removes a bound error event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unerror( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onerror="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound error events from each of the matched elements.' type='jQuery' name='unerror' cat='Events/Browser'>
<desc>Removes all bound error events from each of the matched elements.</desc>
<examples>
<code>$("p").unerror();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onerror="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the blur event of each matched element.' type='jQuery' name='blur' cat='Events/UI'>
<params type='Function' name='fn'>
<desc>A function to bind to the blur event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the blur event of each matched element.</desc>
<examples>
<code>$("p").blur( function() { alert("Hello"); } );</code>
<result>&lt;p onblur="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the blur event of each matched element.' type='jQuery' name='blur' cat='Events/UI'>
<desc>Trigger the blur event of each matched element. This causes all of the functions
that have been bound to thet blur event to be executed.</desc>
<examples>
<code>$("p").blur();</code>
<result>alert('Hello');</result>
<before>&lt;p onblur="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the blur event of each matched element, which will only be executed once.' type='jQuery' name='oneblur' cat='Events/UI'>
<params type='Function' name='fn'>
<desc>A function to bind to the blur event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the blur event of each matched element, which will only be executed once.
Unlike a call to the normal .blur() method, calling .oneblur() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").oneblur( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first blur</result>
<before>&lt;p onblur="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound blur event from each of the matched
elements.' type='jQuery' name='unblur' cat='Events/UI'>
<params type='Function' name='fn'>
<desc>A function to unbind from the blur event on each of the matched elements.</desc>
</params>
<desc>Removes a bound blur event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unblur( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onblur="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound blur events from each of the matched elements.' type='jQuery' name='unblur' cat='Events/UI'>
<desc>Removes all bound blur events from each of the matched elements.</desc>
<examples>
<code>$("p").unblur();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onblur="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the load event of each matched element.' type='jQuery' name='load' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the load event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the load event of each matched element.</desc>
<examples>
<code>$("p").load( function() { alert("Hello"); } );</code>
<result>&lt;p onload="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the load event of each matched element.' type='jQuery' name='load' cat='Events/Browser'>
<desc>Trigger the load event of each matched element. This causes all of the functions
that have been bound to thet load event to be executed.</desc>
<examples>
<code>$("p").load();</code>
<result>alert('Hello');</result>
<before>&lt;p onload="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the load event of each matched element, which will only be executed once.' type='jQuery' name='oneload' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the load event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the load event of each matched element, which will only be executed once.
Unlike a call to the normal .load() method, calling .oneload() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").oneload( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first load</result>
<before>&lt;p onload="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound load event from each of the matched
elements.' type='jQuery' name='unload' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to unbind from the load event on each of the matched elements.</desc>
</params>
<desc>Removes a bound load event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unload( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onload="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound load events from each of the matched elements.' type='jQuery' name='unload' cat='Events/Browser'>
<desc>Removes all bound load events from each of the matched elements.</desc>
<examples>
<code>$("p").unload();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onload="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the select event of each matched element.' type='jQuery' name='select' cat='Events/Form'>
<params type='Function' name='fn'>
<desc>A function to bind to the select event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the select event of each matched element.</desc>
<examples>
<code>$("p").select( function() { alert("Hello"); } );</code>
<result>&lt;p onselect="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the select event of each matched element.' type='jQuery' name='select' cat='Events/Form'>
<desc>Trigger the select event of each matched element. This causes all of the functions
that have been bound to thet select event to be executed.</desc>
<examples>
<code>$("p").select();</code>
<result>alert('Hello');</result>
<before>&lt;p onselect="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the select event of each matched element, which will only be executed once.' type='jQuery' name='oneselect' cat='Events/Form'>
<params type='Function' name='fn'>
<desc>A function to bind to the select event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the select event of each matched element, which will only be executed once.
Unlike a call to the normal .select() method, calling .oneselect() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").oneselect( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first select</result>
<before>&lt;p onselect="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound select event from each of the matched
elements.' type='jQuery' name='unselect' cat='Events/Form'>
<params type='Function' name='fn'>
<desc>A function to unbind from the select event on each of the matched elements.</desc>
</params>
<desc>Removes a bound select event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unselect( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onselect="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound select events from each of the matched elements.' type='jQuery' name='unselect' cat='Events/Form'>
<desc>Removes all bound select events from each of the matched elements.</desc>
<examples>
<code>$("p").unselect();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onselect="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the mouseup event of each matched element.' type='jQuery' name='mouseup' cat='Events/Mouse'>
<params type='Function' name='fn'>
<desc>A function to bind to the mouseup event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the mouseup event of each matched element.</desc>
<examples>
<code>$("p").mouseup( function() { alert("Hello"); } );</code>
<result>&lt;p onmouseup="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the mouseup event of each matched element.' type='jQuery' name='mouseup' cat='Events/Mouse'>
<desc>Trigger the mouseup event of each matched element. This causes all of the functions
that have been bound to thet mouseup event to be executed.</desc>
<examples>
<code>$("p").mouseup();</code>
<result>alert('Hello');</result>
<before>&lt;p onmouseup="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the mouseup event of each matched element, which will only be executed once.' type='jQuery' name='onemouseup' cat='Events/Mouse'>
<params type='Function' name='fn'>
<desc>A function to bind to the mouseup event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the mouseup event of each matched element, which will only be executed once.
Unlike a call to the normal .mouseup() method, calling .onemouseup() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").onemouseup( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first mouseup</result>
<before>&lt;p onmouseup="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes a bound mouseup event from each of the matched
elements.' type='jQuery' name='unmouseup' cat='Events/Mouse'>
<params type='Function' name='fn'>
<desc>A function to unbind from the mouseup event on each of the matched elements.</desc>
</params>
<desc>Removes a bound mouseup event from each of the matched
elements. You must pass the identical function that was used in the original 
bind method.</desc>
<examples>
<code>$("p").unmouseup( myFunction );</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onmouseup="myFunction"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Removes all bound mouseup events from each of the matched elements.' type='jQuery' name='unmouseup' cat='Events/Mouse'>
<desc>Removes all bound mouseup events from each of the matched elements.</desc>
<examples>
<code>$("p").unmouseup();</code>
<result>&lt;p&gt;Hello&lt;/p&gt;</result>
<before>&lt;p onmouseup="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the unload event of each matched element.' type='jQuery' name='unload' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the unload event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the unload event of each matched element.</desc>
<examples>
<code>$("p").unload( function() { alert("Hello"); } );</code>
<result>&lt;p onunload="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Trigger the unload event of each matched element.' type='jQuery' name='unload' cat='Events/Browser'>
<desc>Trigger the unload event of each matched element. This causes all of the functions
that have been bound to thet unload event to be executed.</desc>
<examples>
<code>$("p").unload();</code>
<result>alert('Hello');</result>
<before>&lt;p onunload="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</method>
<method short='Bind a function to the unload event of each matched element, which will only be executed once.' type='jQuery' name='oneunload' cat='Events/Browser'>
<params type='Function' name='fn'>
<desc>A function to bind to the unload event on each of the matched elements.</desc>
</params>
<desc>Bind a function to the unload event of each matched element, which will only be executed once.
Unlike a call to the normal .unload() method, calling .oneunload() causes the bound function to be
only executed the first time it is triggered, and never again (unless it is re-bound).</desc>
<examples>
<code>$("p").oneunload( function() { alert("Hello"); } );</code>
<result>alert('Hello'); // Only executed for the first unload</result>
<before>&lt;p onunload="alert('Hello');"&gt;Hello&lt;/p&gt;</before>
</examples>
</me