| Index | Value |
| 0 |
Object
| Name | Value |
| cat | Core |
| desc | Create a new jQuery Object |
| params | (empty Array)
|
| short | Create a new jQuery Object |
| examples | (empty Array)
|
| constructor |
|
| tests |
Array
| Index | Value |
| 0 | ok( Array.prototype.push, "Array.push()" ); ok( Function.prototype.apply, "Function.apply()" ); ok( document.getElementById, "getElementById" ); ok( document.getElementsByTagName, "getElementsByTagName" ); ok( RegExp, "RegExp" ); ok( jQuery, "jQuery" ); ok( $, "$()" ); |
|
| private | 1 |
| name | jQuery |
|
| 1 |
Object
| Name | Value |
| 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. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to search with, or a string of HTML to create on the fly. |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | $ |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | This finds all p elements that are children of a div element. |
| before | p>one</p> /p></div>t;<p>two</p>< amp;gt;three</p> |
| code | $("div > p") |
| result | [ p>two</p> ] |
|
| 1 |
Object
| Name | Value |
| desc | Creates a div element (and all of its contents) dynamically, and appends it to the element with the ID of body. Internally, an element is created and it's innerHTML property set to the given markup. It is therefore both quite flexible and limited. |
| code | iv>").appendTo("#body")lo</p></div>").appendTo("#body")iv><p>Hello</p |
|
|
| cat | Core |
|
| 2 |
Object
| Name | Value |
| 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 |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to search with. |
| name | expr |
|
| 1 |
Object
| Name | Value |
| type | Element |
| desc | A DOM Element, or Document, representing the base context. |
| name | context |
|
|
| 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 |
| tests | (empty Array)
|
| type | jQuery |
| name | $ |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | This finds all div elements within the specified XML document. |
| code | $("div", xml.responseXML) |
|
|
| cat | Core |
|
| 3 |
Object
| Name | Value |
| short | Wrap jQuery functionality around a specific DOM Element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | A DOM element to be encapsulated by a jQuery object. |
| name | elem |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | $ |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $(document).find("div > p") |
| result | [ p>two</p> ] |
| before | p>one</p> /p></div>t;<p>two</p>< amp;gt;three</p> |
|
| 1 |
Object
| Name | Value |
| desc | Sets the background color of the page to black. |
| code | $(document.body).background( "black" ); |
|
|
| cat | Core |
|
| 4 |
Object
| Name | Value |
| short | Wrap jQuery functionality around a set of DOM Elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<Element> |
| desc | An array of DOM elements to be encapsulated by a jQuery object. |
| name | elems |
|
|
| desc | Wrap jQuery functionality around a set of DOM Elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | $ |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Hides all the input elements within a form |
| code | $( myForm.elements ).hide() |
|
|
| cat | Core |
|
| 5 |
Object
| Name | Value |
| short | A shorthand for $(document). |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute when the DOM is ready. |
| name | fn |
|
|
| 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. You can have as many $(document).ready events on your page as you like. |
| tests | (empty Array)
|
| type | jQuery |
| name | $ |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Executes the function when the DOM is ready to be used. |
| code | $(function(){ // Document is ready }); |
|
|
| cat | Core |
|
| 6 |
Object
| Name | Value |
| short | A means of creating a cloned copy of a jQuery object. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | jQuery |
| desc | The jQuery object to be cloned. |
| name | obj |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | $ |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| 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). |
| code | var div = $("div"); $( div ).find("p"); |
|
|
| cat | Core |
|
| 7 |
Object
| Name | Value |
| property | 1 |
| cat | Core |
| type | String |
| desc | The current version of jQuery. |
| params | (empty Array)
|
| short | The current version of jQuery. |
| examples | (empty Array)
|
| tests | (empty Array)
|
| private | 1 |
| name | jquery |
|
| 8 |
Object
| Name | Value |
| property | 1 |
| cat | Core |
| type | Number |
| desc | The number of elements currently matched. |
| params | (empty Array)
|
| short | The number of elements currently matched. |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").length; |
| result | 2 |
| before | <img src="test1.jpg"/> <img src="test2.jpg"/> |
|
|
| tests |
Array
| Index | Value |
| 0 | ok( $("div").length == 2, "Get Number of Elements Found" ); |
|
| name | length |
|
| 9 |
Object
| Name | Value |
| short | The number of elements currently matched. |
| params | (empty Array)
|
| desc | The number of elements currently matched. |
| tests |
Array
| Index | Value |
| 0 | ok( $("div").size() == 2, "Get Number of Elements Found" ); |
|
| type | Number |
| name | size |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").size(); |
| result | 2 |
| before | <img src="test1.jpg"/> <img src="test2.jpg"/> |
|
|
| cat | Core |
|
| 10 |
Object
| Name | Value |
| short | Access all matched elements. |
| params | (empty Array)
|
| 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). |
| tests |
Array
| Index | Value |
| 0 | isSet( $("div").get(), q("main","foo"), "Get All Elements" ); |
|
| type | Array<Element> |
| name | get |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").get(); |
| result | [ <img src="test1.jpg"/> <img src="test2.jpg"/> ] |
| before | <img src="test1.jpg"/> <img src="test2.jpg"/> |
|
|
| cat | Core |
|
| 11 |
Object
| Name | Value |
| short | Access a single matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Number |
| desc | Access the element in the Nth position. |
| name | num |
|
|
| desc | Access a single matched element. num is used to access the Nth element matched. |
| tests |
Array
| Index | Value |
| 0 | ok( $("div").get(0) == cument.getElementById("main"), "Get A Single Element" ); |
|
| type | Element |
| name | get |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").get(1); |
| result | [ <img src="test1.jpg"/> ] |
| before | <img src="test1.jpg"/> <img src="test2.jpg"/> |
|
|
| cat | Core |
|
| 12 |
Object
| Name | Value |
| cat | Core |
| type | jQuery |
| desc | Set the jQuery object to an array of elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Elements |
| desc | An array of elements |
| name | elems |
|
|
| short | Set the jQuery object to an array of elements. |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").get([ document.body ]); |
| result | $("img").get() == [ document.body ] |
|
|
| tests | (empty Array)
|
| private | 1 |
| name | get |
|
| 13 |
Object
| Name | Value |
| short | Execute a function within the context of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to execute |
| name | fn |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var div = $("div"); div.each(function(){this.foo = 'zoo';}); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).foo != "zoo" ) pass = false; } ok( pass, "Execute a function, Relative" ); |
|
| type | jQuery |
| name | each |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").each(function(){ this.src = "test.jpg"; }); |
| result | <img src="test.jpg"/> <img src="test.jpg"/> |
| before | <img/> <img/> |
|
| 1 |
Object
| Name | Value |
| code | $("img").each(function(i){ alert( "Image #" + i + " is " + this ); }); |
| result | <img src="test.jpg"/> <img src="test.jpg"/> |
| before | <img/> <img/> |
|
|
| cat | Core |
|
| 14 |
Object
| Name | Value |
| short | Searches every matched element for the object and returns the index of the element, if found, starting with zero. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | Object to search for |
| name | obj |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok( $([window, document]).index(window) == 0, "Check for index of elements" ); ok( $([window, document]).index(document) == 1, "Check for index of elements" ); var inputElements = ,#radio2,#check1,#check2'); />ok( ment.getElementById('radio1')) == 0, "Check for index of elements" ); ok( ment.getElementById('radio2')) == 1, "Check for index of elements" ); ok( ment.getElementById('check1')) == 2, "Check for index of elements" ); ok( ment.getElementById('check2')) == 3, "Check for index of elements" ); ok( inputElements.index(window) == -1, "Check for not found index" ); ok( inputElements.index(document) == -1, "Check for not found index" ); |
|
| type | Number |
| name | index |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ment.getElementById('foobar')) |
| result | 0 |
| before | <div </b><span;/div><b></b>< "></span> |
|
| 1 |
Object
| Name | Value |
| code | ocument.getElementById('foo')) |
| result | 2 |
| before | <div </b><span;/div><b></b>< "></span> |
|
| 2 |
Object
| Name | Value |
| code | ocument.getElementById('bar')) |
| result | -1 |
| before | <div </b><span;/div><b></b>< "></span> |
|
|
| cat | Core |
|
| 15 |
Object
| Name | Value |
| short | Access a property on the first matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The name of the property to access. |
| name | name |
|
|
| desc | Access a property on the first matched element. This method makes it easy to retrieve a property value from the first matched element. |
| tests |
Array
| Index | Value |
| 0 | ok( $('#text1').attr('value') == "Test", 'Check for value attribute' ); ok( $('#text1').attr('type') == "text", 'Check for type attribute' ); ok( $('#radio1').attr('type') == "radio", 'Check for type attribute' ); ok( $('#check1').attr('type') == "checkbox", 'Check for type attribute' ); ok( $('#simon1').attr('rel') == "bookmark", 'Check for rel attribute' ); ok( $('#google').attr('title') == "Google!", 'Check for title attribute' ); ok( $('#mark').attr('hreflang') == "en", 'Check for hreflang attribute' ); ok( $('#en').attr('lang') == "en", 'Check for lang attribute' ); ok( $('#simon').attr('class') == "blog link", 'Check for class attribute' ); ok( $('#name').attr('name') == "name", 'Check for name attribute' ); ok( $('#text1').attr('name') == "action", 'Check for name attribute' ); ok( action').indexOf("formaction") >= 0, 'Check for action attribute' ); |
|
| type | Object |
| name | attr |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").attr("src"); |
| result | test.jpg |
| before | <img src="test.jpg"/> |
|
|
| cat | DOM |
|
| 16 |
Object
| Name | Value |
| short | Set a hash of key/value object properties to all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs to set as object properties. |
| name | prop |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var pass = true; $("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){ if ( this.getAttribute('foo') != "baz" && this.getAttribute('zoo') != "ping" ) pass = false; }); ok( pass, "Set Multiple Attributes" ); |
|
| type | jQuery |
| name | attr |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").attr({ src: "test.jpg", alt: "Test Image" }); |
| result | <img src="test.jpg" alt="Test Image"/> |
| before | <img/> |
|
|
| cat | DOM |
|
| 17 |
Object
| Name | Value |
| short | Set a single property to a value, on all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The name of the property to set. |
| name | key |
|
| 1 |
Object
| Name | Value |
| type | Object |
| desc | The value to set the property to. |
| name | value |
|
|
| desc | Set a single property to a value, on all matched elements. |
| tests |
Array
| Index | Value |
| 0 | var div = $("div"); div.attr("foo", "bar"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).getAttribute('foo') != "bar" ) pass = false; } ok( pass, "Set Attribute" );
$("#name").attr('name', 'something'); ok( $("#name").name() == 'something', 'Set name attribute' ); $("#check2").attr('checked', true); ok( tElementById('check2').checked == true, 'Set checked attribute' ); $("#check2").attr('checked', false); ok( tElementById('check2').checked == false, 'Set checked attribute' ); |
|
| type | jQuery |
| name | attr |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | "img").attr("src","test.jpg"); |
| result | <img src="test.jpg"/> |
| before | <img/> |
|
|
| cat | DOM |
|
| 18 |
Object
| Name | Value |
| short | Access a style property on the first matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The name of the property to access. |
| name | name |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok( $('#main').css("display") == 'none', 'Check for css property "display"'); |
|
| type | Object |
| name | css |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Retrieves the color style of the first paragraph |
| before | <p style="color:red;">Test Paragraph.</p> |
| code | $("p").css("color"); |
| result | red |
|
| 1 |
Object
| Name | Value |
| 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. |
| before | <p style="font-weight: bold;">Test Paragraph.</p> |
| code | $("p").css("fontWeight"); |
| result | bold |
|
|
| cat | CSS |
|
| 19 |
Object
| Name | Value |
| short | Set a hash of key/value style properties to all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs to set as style properties. |
| name | prop |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); $('#foo').css({display: 'none'}); ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden'); $('#foo').css({display: 'block'}); ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible'); |
|
| type | jQuery |
| name | css |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").css({ color: "red", background: "blue" }); |
| result | <p style="color:red; background:blue;">Test Paragraph.</p> |
| before | <p>Test Paragraph.</p> |
|
|
| cat | CSS |
|
| 20 |
Object
| Name | Value |
| short | Set a single style property to a value, on all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The name of the property to set. |
| name | key |
|
| 1 |
Object
| Name | Value |
| type | Object |
| desc | The value to set the property to. |
| name | value |
|
|
| desc | Set a single style property to a value, on all matched elements. |
| tests |
Array
| Index | Value |
| 0 | ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); $('#foo').css('display', 'none'); ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden'); $('#foo').css('display', 'block'); ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible'); |
|
| type | jQuery |
| name | css |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Changes the color of all paragraphs to red |
| before | <p>Test Paragraph.</p> |
| code | $("p").css("color","red"); |
| result | <p style="color:red;">Test Paragraph.</p> |
|
|
| cat | CSS |
|
| 21 |
Object
| Name | Value |
| short | Retrieve the text contents of all matched elements. |
| params | (empty Array)
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This link has class=\"blog\": Simon Willison's Weblog"; ok( $('#sap').text() == expected, 'Check for merged text of more then one element.' ); |
|
| type | String |
| name | text |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").text(); |
| result | Test Paragraph. |
| before | <p>Test Paragraph.</p> |
|
|
| cat | DOM |
|
| 22 |
Object
| Name | Value |
| short | Wrap all matched elements with a structure of other elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A string of HTML, that will be created on the fly and wrapped around the target. |
| name | html |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var defaultText = 'Try them out:' var result = $('#first').wrap('<div p;lt;/div>').text(); mp;gt;</span></div>').text(); ss="red"><span& />ok( defaultText == result, 'Check for wrapping of on-the-fly html' ); ok( .parent().parent().is('.red'), 'Check if wrapper has class "red"' ); |
|
| type | jQuery |
| name | wrap |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").wrap("<div amp;gt;</div>"); |
| result | <div '><p>Test /p></div> |
| before | <p>Test Paragraph.</p> |
|
|
| cat | DOM/Manipulation |
|
| 23 |
Object
| Name | Value |
| short | Wrap all matched elements with a structure of other elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | A DOM element that will be wrapped. |
| name | elem |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var defaultText = 'Try them out:' var result = entById('empty')).parent(); #first').wrap(document.getElement />ok( result.is('ol'), 'Check for element wrapping' ); ok( result.text() == defaultText, 'Check for element wrapping' ); |
|
| type | jQuery |
| name | wrap |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").wrap( ment.getElementById('content') ); |
| result | <div "><p>Test /p></div> |
| before | <p>Test .</p><div t"></div> |
|
|
| cat | DOM/Manipulation |
|
| 24 |
Object
| Name | Value |
| short | Append any number of elements to the inside of every matched elements, generated from the provided HTML. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A string of HTML, that will be created on the fly and appended to the target. |
| name | html |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var defaultText = 'Try them out:' var result = t;buga</b>'); irst').append('<b>bug />ok( result.text() == defaultText + 'buga', 'Check if text appending works' ); |
|
| type | jQuery |
| name | append |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ;gt;Hello</b>"); |
| result | <p>I would like to say: t;/b></p> |
| before | <p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 25 |
Object
| Name | Value |
| short | Append an element to the inside of all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | A DOM element that will be appended. |
| name | elem |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
/>ok( expected == $('#sap').text(), "Check for appending of element" ); |
|
| type | jQuery |
| name | append |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").append( $("#foo")[0] ); |
| result | <p>I would like to say: <b t;/b></p> |
| before | <p>I would like to say: </p><b amp;gt;Hello</b> |
|
|
| cat | DOM/Manipulation |
|
| 26 |
Object
| Name | Value |
| short | Append any number of elements to the inside of all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<Element> |
| desc | An array of elements, all of which will be appended. |
| name | elems |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; .getElementById('yahoo')]); />ok( expected == $('#sap').text(), "Check for appending of array of elements" ); |
|
| type | jQuery |
| name | append |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").append( $("b") ); |
| result | <p>I would like to say: t;/b></p> |
| before | <p>I would like to say: amp;gt;Hello</b> |
|
|
| cat | DOM/Manipulation |
|
| 27 |
Object
| Name | Value |
| short | Prepend any number of elements to the inside of every matched elements, generated from the provided HTML. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A string of HTML, that will be created on the fly and appended to the target. |
| name | html |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var defaultText = 'Try them out:' var result = t;buga</b>'); rst').prepend('<b>buga />ok( result.text() == 'buga' + defaultText, 'Check if text prepending works' ); |
|
| type | jQuery |
| name | prepend |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ;gt;Hello</b>"); |
| result | mp;gt;Hello</b>I would like to say: </p> |
| before | <p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 28 |
Object
| Name | Value |
| short | Prepend an element to the inside of all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | A DOM element that will be appended. |
| name | elem |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";
/>ok( expected == $('#sap').text(), "Check for prepending of element" ); |
|
| type | jQuery |
| name | prepend |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").prepend( $("#foo")[0] ); |
| result | <p><b mp;gt;Hello</b>I would like to say: </p> |
| before | <p>I would like to say: </p><b amp;gt;Hello</b> |
|
|
| cat | DOM/Manipulation |
|
| 29 |
Object
| Name | Value |
| short | Prepend any number of elements to the inside of all matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<Element> |
| desc | An array of elements, all of which will be appended. |
| name | elems |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog"; .getElementById('yahoo')]); />ok( expected == $('#sap').text(), "Check for prepending of array of elements" ); |
|
| type | jQuery |
| name | prepend |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").prepend( $("b") ); |
| result | mp;gt;Hello</b>I would like to say: </p> |
| before | <p>I would like to say: amp;gt;Hello</b> |
|
|
| cat | DOM/Manipulation |
|
| 30 |
Object
| Name | Value |
| short | Insert any number of dynamically generated elements before each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A string of HTML, that will be created on the fly and appended to the target. |
| name | html |
|
|
| desc | Insert any number of dynamically generated elements before each of the matched elements. |
| tests |
Array
| Index | Value |
| 0 | var expected = 'This is a normal link: bugaYahoo';
ahoo').before('<b>buga& />ok( expected == $('#en').text(), 'Insert String before' ); |
|
| type | jQuery |
| name | before |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ;gt;Hello</b>"); |
| result | t;/b><p>I would like to say: </p> |
| before | <p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 31 |
Object
| Name | Value |
| short | Insert an element before each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | A DOM element that will be appended. |
| name | elem |
|
|
| desc | Insert an element before each of the matched elements. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This is a normal link: Try them out:Yahoo";
/>ok( expected == $('#en').text(), "Insert element before" ); |
|
| type | jQuery |
| name | before |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").before( $("#foo")[0] ); |
| result | <b t;/b><p>I would like to say: </p> |
| before | <p>I would like to say: </p><b amp;gt;Hello</b> |
|
|
| cat | DOM/Manipulation |
|
| 32 |
Object
| Name | Value |
| short | Insert any number of elements before each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<Element> |
| desc | An array of elements, all of which will be appended. |
| name | elems |
|
|
| desc | Insert any number of elements before each of the matched elements. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This is a normal link: Try them out:diveintomarkYahoo"; t.getElementById('mark')]); />ok( expected == $('#en').text(), "Insert array of elements before" ); |
|
| type | jQuery |
| name | before |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").before( $("b") ); |
| result | t;/b><p>I would like to say: </p> |
| before | <p>I would like to say: amp;gt;Hello</b> |
|
|
| cat | DOM/Manipulation |
|
| 33 |
Object
| Name | Value |
| short | Insert any number of dynamically generated elements after each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A string of HTML, that will be created on the fly and appended to the target. |
| name | html |
|
|
| desc | Insert any number of dynamically generated elements after each of the matched elements. |
| tests |
Array
| Index | Value |
| 0 | var expected = 'This is a normal link: Yahoobuga';
yahoo').after('<b>buga />ok( expected == $('#en').text(), 'Insert String after' ); |
|
| type | jQuery |
| name | after |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ;gt;Hello</b>"); |
| result | <p>I would like to say: amp;gt;Hello</b> |
| before | <p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 34 |
Object
| Name | Value |
| short | Insert an element after each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | A DOM element that will be appended. |
| name | elem |
|
|
| desc | Insert an element after each of the matched elements. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This is a normal link: YahooTry them out:";
/>ok( expected == $('#en').text(), "Insert element after" ); |
|
| type | jQuery |
| name | after |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").after( $("#foo")[0] ); |
| result | <p>I would like to say: </p><b amp;gt;Hello</b> |
| before | <b t;/b><p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 35 |
Object
| Name | Value |
| short | Insert any number of elements after each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<Element> |
| desc | An array of elements, all of which will be appended. |
| name | elems |
|
|
| desc | Insert any number of elements after each of the matched elements. |
| tests |
Array
| Index | Value |
| 0 | var expected = "This is a normal link: YahooTry them out:diveintomark"; t.getElementById('mark')]); />ok( expected == $('#en').text(), "Insert array of elements after" ); |
|
| type | jQuery |
| name | after |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").after( $("b") ); |
| result | <p>I would like to say: amp;gt;Hello</b> |
| before | t;/b><p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 36 |
Object
| Name | Value |
| short | End the most recent 'destructive' operation, reverting the list of matched elements back to its previous state. |
| params | (empty Array)
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok( 'Yahoo' == yahoo').parent().end().text(), 'Check for end' ); |
|
| type | jQuery |
| name | end |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").find("span").end(); |
| result | $("p").find("span").end() == [ p>...</p> ] |
| before | gt;Hello</span>,;lt;p><span>H how are you?</p> |
|
|
| cat | DOM/Traversing |
|
| 37 |
Object
| Name | Value |
| short | Searches for all elements that match the specified expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to search with. |
| name | expr |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok( 'Yahoo' == oo').find('.blogTest').text(), 'Check for find' ); |
|
| type | jQuery |
| name | find |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").find("span"); |
| result | $("p").find("span") == [ ;gt;Hello</span> ] |
| before | gt;Hello</span>,;lt;p><span>H how are you?</p> |
|
|
| cat | DOM/Traversing |
|
| 38 |
Object
| Name | Value |
| short | Create cloned copies of all matched DOM Elements. |
| params | (empty Array)
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | 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' ); |
|
| type | jQuery |
| name | clone |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("b").clone().prependTo("p"); |
| result | mp;gt;Hello</b>,t;<p><b>Hello</b>,b>Hello</b>&l how are you?</p> |
| before | t;/b><p>, how are you?</p> |
|
|
| cat | DOM/Manipulation |
|
| 39 |
Object
| Name | Value |
| short | Removes all elements from the set of matched elements that do not match the specified expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to search with. |
| name | expr |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | isSet( ut").filter(":checked").get(), q("radio2", "check1"), "Filter elements" ); |
| 1 | filter(":checked",function(i){ ok( this == q("radio2", "check1")[i], "Filter elements, context" ); }); |
| 2 | $("#main > p#ap > ",function(){},function(i){ /> ok( this == q("google","groups", "mark")[i], "Filter elements, else context" ); }); |
|
| type | jQuery |
| name | filter |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").filter(".selected") |
| result | $("p").filter(".selected") == [ <p amp;gt;Hello</p> ] |
| before | <p /p><p>Howselected">Hello</p& are you?</p> |
|
|
| cat | DOM/Traversing |
|
| 40 |
Object
| Name | Value |
| short | Removes all elements from the set of matched elements that do not match at least one of the expressions passed to the function. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<String> |
| desc | A set of expressions to evaluate against |
| name | exprs |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | filter |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").filter([".selected", ":first"]) |
| result | $("p").filter([".selected", ":first"]) == [ mp;gt;Hello</p>, <p class="selected">And Again</p> ] |
| before | ><p>Hellomp;lt;p>Hello</p&a ain</p><p class="selected">And Again</p> |
|
|
| cat | DOM/Traversing |
|
| 41 |
Object
| Name | Value |
| short | Removes the specified Element from the set of matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | An element to remove from the set |
| name | el |
|
|
| desc | Removes the specified Element from the set of matched elements. This method is used to remove a single Element from a jQuery object. |
| tests | (empty Array)
|
| type | jQuery |
| name | not |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").not( ent.getElementById("selected") ) |
| result | [ amp;gt;Hello</p> ] |
| before | llo</p><p id="selected">Hello Again</p> |
|
|
| cat | DOM/Traversing |
|
| 42 |
Object
| Name | Value |
| short | Removes elements matching the specified expression from the set of matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression with which to remove matching elements |
| name | expr |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok($("#main > p#ap > a").not("#google").length == 2, ".not") |
|
| type | jQuery |
| name | not |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").not("#selected") |
| result | [ amp;gt;Hello</p> ] |
| before | llo</p><p id="selected">Hello Again</p> |
|
|
| cat | DOM/Traversing |
|
| 43 |
Object
| Name | Value |
| short | Adds the elements matched by the expression to the jQuery object. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression whose matched elements are added |
| name | expr |
|
|
| desc | Adds the elements matched by the expression to the jQuery object. This can be used to concatenate the result sets of two expressions. |
| tests | (empty Array)
|
| type | jQuery |
| name | add |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").add("span") |
| result | [ mp;gt;Hello</p>, <span>Hello Again</span> ] |
| before | p;gt;<span>Hello</p><p><span& span></p> |
|
|
| cat | DOM/Traversing |
|
| 44 |
Object
| Name | Value |
| short | Adds each of the Elements in the array to the set of matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array<Element> |
| desc | An array of Elements to add |
| name | els |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | add |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | [document.getElementById("a"), document.getElementById("b")]) |
| result | [ mp;gt;Hello</p>, <span id="a">Hello Again</span>, <span id="b">And Again</span> ] |
| before | ;<p><span>Hello</p>< id="a">Hello p;lt;/span><span id="b">And span></p> |
|
|
| cat | DOM/Traversing |
|
| 45 |
Object
| Name | Value |
| short | Adds a single Element to the set of matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | An Element to add |
| name | el |
|
|
| desc | Adds a single Element to the set of matched elements. This is used to add a single Element to a jQuery object. |
| tests | (empty Array)
|
| type | jQuery |
| name | add |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").add( document.getElementById("a") ) |
| result | [ mp;gt;Hello</p>, <span id="a">Hello Again</span> ] |
| before | ;<p><span>Hello</p>< id="a">Hello span></p> |
|
|
| cat | DOM/Traversing |
|
| 46 |
Object
| Name | Value |
| short | Checks the current selection against an expression and returns true, if the selection fits the given expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The expression with which to filter |
| name | expr |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | ok( $('#form').is('form'), 'Check for element: A form must be a form' ); ok( !$('#form').is('div'), 'Check for element: A form is not a div' ); ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' ); ok( !$('#mark').is('.link'), 'Check for class: Did not expect class "link"' ); ok( $('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' ); ok( !$('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' ); ok( $('#en').is('[@lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' ); ok( !$('#en').is('[@lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' ); ok( #text1').is('[@type="text"]'), 'Check for attribute: Expected attribute type to be "text"' ); ok( text1').is('[@type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' ); ok( $('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' ); ok( !$('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' ); ok( $('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' ); ok( !$('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' ); ok( $('#foo').is('[p]'), 'Check for child: Expected a child "p" element' ); ok( !$('#foo').is('[ul]'), 'Check for child: Did not expect "ul" element' ); ok( $('#foo').is('[p][a][code]'), 'Check for childs: Expected "p", "a" and "code" child elements' ); ok( #foo').is('[p][a][code][ol]'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' ); ok( !$('#foo').is(0), 'Expected false for an invalid expression - 0' ); ok( !$('#foo').is(null), 'Expected false for an invalid expression - null' ); ok( !$('#foo').is(''), 'Expected false for an invalid expression - ""' ); ok( !$('#foo').is(undefined), 'Expected false for an invalid expression - undefined' ); |
|
| type | Boolean |
| name | is |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Returns true, because the parent of the input is a form element |
| before | p;lt;form><input type="checkbox" /></form> |
| code | eckbox']").parent().is("form") |
| result | true |
|
| 1 |
Object
| Name | Value |
| desc | Returns false, because the parent of the input is a p element |
| before | <p><input type="checkbox" p></form> |
| code | eckbox']").parent().is("form") |
| result | false |
|
| 2 |
Object
| Name | Value |
| desc | An invalid expression always returns false. |
| before | m></form> |
| code | $("form").is(null) |
| result | false |
|
|
| cat | DOM/Traversing |
|
| 47 |
Object
| Name | Value |
| cat | Core |
| type | jQuery |
| desc | |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array |
| desc | |
| name | args |
|
| 1 |
Object
| Name | Value |
| type | Boolean |
| desc | |
| name | table |
|
| 2 |
Object
| Name | Value |
| type | Number |
| desc | |
| name | int |
|
| 3 |
Object
| Name | Value |
| type | Function |
| desc | The function doing the DOM manipulation. |
| name | fn |
|
|
| short | |
| examples | (empty Array)
|
| tests | (empty Array)
|
| private | 1 |
| name | domManip |
|
| 48 |
Object
| Name | Value |
| cat | Core |
| type | jQuery |
| desc | |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array |
| desc | |
| name | a |
|
| 1 |
Object
| Name | Value |
| type | Array |
| desc | |
| name | args |
|
|
| short | |
| examples | (empty Array)
|
| tests | (empty Array)
|
| private | 1 |
| name | pushStack |
|
| 49 |
Object
| Name | Value |
| cat | Core |
| type | Object |
| desc | Extends the jQuery object itself. Can be used to add both static functions and plugin methods. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | |
| name | obj |
|
|
| short | Extends the jQuery object itself. |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Adds two plugin methods. |
| code | $.fn.extend({ check: function() { this.each(function() { this.checked = true; }); ), uncheck: function() { this.each(function() { this.checked = false; }); } }); nput[@type=radio]").uncheck(); |
|
|
| tests | (empty Array)
|
| private | 1 |
| name | extend |
|
| 50 |
Object
| Name | Value |
| short | Extend one object with another, returning the original, modified, object. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | The object to extend |
| name | obj |
|
| 1 |
Object
| Name | Value |
| type | Object |
| desc | The object that will be merged into the first. |
| name | prop |
|
|
| desc | Extend one object with another, returning the original, modified, object. This is a great utility for simple inheritance. |
| tests |
Array
| Index | Value |
| 0 | 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" ); |
|
| type | Object |
| name | $.extend |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | var settings = { validate: false, limit: 5, name: "foo" }; var options = { validate: true, name: "bar" }; jQuery.extend(settings, options); |
| result | settings == { validate: true, limit: 5, name: "bar" } |
|
|
| cat | Javascript |
|
| 51 |
Object
| Name | Value |
| cat | Core |
| type | undefined |
| desc | |
| params | (empty Array)
|
| short | |
| examples | (empty Array)
|
| tests | (empty Array)
|
| private | 1 |
| name | init |
|
| 52 |
Object
| Name | Value |
| short | A generic iterator function, which can be used to seemlessly iterate over both objects and arrays. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | The object, or array, to iterate over. |
| name | obj |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | The function that will be executed on every object. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | Object |
| name | $.each |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | This is an example of iterating over the items in an array, accessing both the current item and its index. |
| code | $.each( [0,1,2], function(i){ alert( "Item #" + i + ": " + this ); }); |
|
| 1 |
Object
| Name | Value |
| desc | This is an example of iterating over the properties in an Object, accessing both the current item and its key. |
| code | $.each( { name: "John", lang: "JS" }, function(i){ alert( "Name: " + i + ", Value: " + this ); }); |
|
|
| cat | Javascript |
|
| 53 |
Object
| Name | Value |
| cat | Core |
| type | Array<Element> |
| desc | |
| params | (empty Array)
|
| short | |
| examples | (empty Array)
|
| tests |
Array
| Index | Value |
| 0 | t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); ok( $("*").size() >= 30, "Element Selector" ); t( "Parent Element", "div div", ["foo"] );
t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] );
t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] );
t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","foo"] );
t( "Child", "p > a", roups","mark","yahoo","simon"] ); t( "Child", "p> a", roups","mark","yahoo","simon"] ); t( "Child", "p >a", roups","mark","yahoo","simon"] ); t( "Child", "p>a", roups","mark","yahoo","simon"] ); t( "Child w/ Class", "p > a.blog", ["mark","simon"] ); t( "All Children", "code > *", ["anchor1","anchor2"] ); t( "All Grandchildren", "p > * > *", ["anchor1","anchor2"] ); t( "Adjacent", "a + a", ["groups"] ); t( "Adjacent", "a +a", ["groups"] ); t( "Adjacent", "a+ a", ["groups"] ); t( "Adjacent", "a+a", ["groups"] ); t( "Adjacent", "p + p", ["ap","en","sap"] ); t( "Comma, Child, and Adjacent", "a + a, code > a", ["groups","anchor1","anchor2"] ); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] );
t( "Non-existing part of attribute [@name*=bla]", "[@name*=bla]", [] ); t( "Non-existing start of attribute [@name^=bla]", "[@name^=bla]", [] ); t( "Non-existing end of attribute [@name$=bla]", "[@name$=bla]", [] );
t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1"] ); t( "Attribute Equals", "a[@rel=bookmark]", ["simon1"] ); t( "Multiple Attribute Equals", idden'],input[@type='radio']", ["hidden1","radio1","radio2"] ); t( "Multiple Attribute Equals", dden\"],input[@type='radio']", ["hidden1","radio1","radio2"] ); t( "Multiple Attribute Equals", e=hidden],input[@type=radio]", ["hidden1","radio1","radio2"] );
t( "Attribute Begins With", "a[@href ^= 'http://www']", ["google","yahoo"] ); t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] ); t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] ); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled", 2","hidden1","hidden2","name"]dio1","radio2","check1","check2","hidden1" ); t( "Disabled UI Element", "input:disabled", ["text2"] ); t( "Checked UI Element", "input:checked", ["radio2","check1"] ); t( "Selected Option Element", "option:selected", tion2d","option3b","option3c"] ); t( "Text Contains", "a:contains('Google')", ["google","groups"] ); t( "Text Contains", "a:contains('Google Groups')", ["groups"] ); t( "Element Preceded By", "p ~ div", ["foo"] ); t( "Not", "a.blog:not(.link)", ["mark"] );
ok( jQuery.find("//*").length >= 30, "All Elements (//*)" ); t( "All Div Elements", "//div", ["main","foo"] ); t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] ); t( "Absolute and Relative Paths", "/html//div", ["main","foo"] ); t( "All Children, Explicit", "//code/*", ["anchor1","anchor2"] ); t( "All Children, Implicit", "//code/", ["anchor1","anchor2"] ); t( "Attribute Exists", "//a[@title]", ["google"] ); t( "Attribute Equals", "//a[@rel='bookmark']", ["simon1"] ); t( "Parent Axis", "//p/..", ["main","foo"] ); t( "Sibling Axis", "//p/../", pty","form","sndp","en","sap"]p","foo","first","firstUL","empty","form", ); t( "Sibling Axis", "//p/../*", pty","form","sndp","en","sap"]p","foo","first","firstUL","empty","form", ); t( "Has Children", "//p[a]", ["firstp","ap","en","sap"] );
t( "nth Element", "p:nth(1)", ["ap"] ); t( "First Element", "p:first", ["firstp"] ); t( "Last Element", "p:last", ["first"] ); t( "Even Elements", "p:even", ["firstp","sndp","sap"] ); t( "Odd Elements", "p:odd", ["ap","en","first"] ); t( "Position Equals", "p:eq(1)", ["ap"] ); t( "Position Greater Than", "p:gt(0)", ap","sndp","en","sap","first"] ); t( "Position Less Than", "p:lt(3)", ["firstp","ap","sndp"] ); t( "Is A Parent", "p:parent", ap","sndp","en","sap","first"] ); t( "Is Visible", "input:visible", io2","check1","check2","name"] ); t( "Is Hidden", "input:hidden", ["hidden1","hidden2"] );
t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] );
t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] );
t(
"Form element :input", ":input", ["text1", "text2", "radio1", "radio2",
"check1", "check2", "hidden1", "hidden2", "name", "button", "area1",
"select1", "select2", "select3"] ); t( "Form element :radio", ":radio", ["radio1", "radio2"] ); t( "Form element :checkbox", ":checkbox", ["check1", "check2"] ); t( "Form element :text", ":text", ["text1", "text2", "hidden2", "name"] ); t( "Form element :radio:checked", ":radio:checked", ["radio2"] ); t( "Form element :checkbox:checked", ":checkbox:checked", ["check1"] ); t( "Form element :checkbox:checked, :radio:checked", ":checkbox:checked, :radio:checked", ["check1", "radio2"] );
t( ":not() Existing attribute", "select:not([@multiple])", ["select1", "select2"]); t( ":not() Equals attribute", "select:not([@name=select1])", ["select2", "select3"]); t( ":not() Equals quoted attribute", elect:not([@name='select1'])", ["select2", "select3"]); |
|
| private | 1 |
| name | $.find |
|
| 54 |
Object
| Name | Value |
| short | Remove the whitespace from the beginning and end of a string. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The string to trim. |
| name | str |
|
|
| desc | Remove the whitespace from the beginning and end of a string. |
| tests | (empty Array)
|
| type | String |
| name | $.trim |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.trim(" hello, how are you? "); |
| result | "hello, how are you?" |
|
|
| cat | Javascript |
|
| 55 |
Object
| Name | Value |
| cat | DOM/Traversing |
| type | Array<Element> |
| desc | All ancestors of a given element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | The element to find the ancestors of. |
| name | elem |
|
|
| short | All ancestors of a given element. |
| examples | (empty Array)
|
| tests | (empty Array)
|
| private | 1 |
| name | $.parents |
|
| 56 |
Object
| Name | Value |
| cat | DOM/Traversing |
| type | Array |
| desc | All elements on a specified axis. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Element |
| desc | The element to find all the siblings of (including itself). |
| name | elem |
|
|
| short | All elements on a specified axis. |
| examples | (empty Array)
|
| tests | (empty Array)
|
| private | 1 |
| name | $.sibling |
|
| 57 |
Object
| Name | Value |
| short | Merge two arrays together, removing all duplicates. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array |
| desc | The first array to merge. |
| name | first |
|
| 1 |
Object
| Name | Value |
| type | Array |
| desc | The second array to merge. |
| name | second |
|
|
| 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. |
| tests | (empty Array)
|
| type | Array |
| name | $.merge |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.merge( [0,1,2], [2,3,4] ) |
| result | [0,1,2,3,4] |
|
| 1 |
Object
| Name | Value |
| code | $.merge( [3,2,1], [4,3,2] ) |
| result | [3,2,1,4] |
|
|
| cat | Javascript |
|
| 58 |
Object
| Name | Value |
| short | Filter items out of an array, by using a filter function. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array |
| desc | The Array to find items in. |
| name | array |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | The function to process each item against. |
| name | fn |
|
| 2 |
Object
| Name | Value |
| type | Boolean |
| desc | Invert the selection - select the opposite of the function. |
| name | inv |
|
|
| 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. |
| tests | (empty Array)
|
| type | Array |
| name | $.grep |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.grep( [0,1,2], function(i){ return i > 0; }); |
| result | [1, 2] |
|
|
| cat | Javascript |
|
| 59 |
Object
| Name | Value |
| short | Translate all items in an array to another array of items. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Array |
| desc | The Array to translate. |
| name | array |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | The function to process each item against. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | Array |
| name | $.map |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.map( [0,1,2], function(i){ return i + 4; }); |
| result | [4, 5, 6] |
|
| 1 |
Object
| Name | Value |
| code | $.map( [0,1,2], function(i){ return i > 0 ? i + 1 : null; }); |
| result | [2, 3] |
|
| 2 |
Object
| Name | Value |
| code | $.map( [0,1,2], function(i){ return [ i, i + 1 ]; }); |
| result | [0, 1, 1, 2, 2, 3] |
|
|
| cat | Javascript |
|
| 60 |
Object
| Name | Value |
| short | Contains flags for the useragent, read from navigator. |
| params | (empty Array)
|
| desc | Contains flags for the useragent, read from navigator.userAgent. Available flags are: safari, opera, msie, mozilla This property is available before the DOM is ready, therefore you can use it to add ready events only for certain browsers.
See <a /jquery/jqbrowser/"> dwell.co.uk/geekery/javascript/jquery/jqbrowser/"& />jQBrowser plugin</a> for advanced browser detection: |
| tests | (empty Array)
|
| type | Boolean |
| name | $.browser |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | returns true if the current useragent is some version of microsoft's internet explorer |
| code | $.browser.msie |
|
| 1 |
Object
| Name | Value |
| desc | Alerts "this is safari!" only for safari browsers |
| code | if($.browser.safari) { $( function() { alert("this is safari!"); } ); } |
|
|
| cat | Javascript |
|
| 61 |
Object
| Name | Value |
| short | Append all of the matched elements to another, specified, set of elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A jQuery expression of elements to match. |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | appendTo |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").appendTo("#foo"); |
| result | <div foo"><p>I would like to say: /p></div> |
| before | <p>I would like to say: </p><div o"></div> |
|
|
| cat | DOM/Manipulation |
|
| 62 |
Object
| Name | Value |
| short | Prepend all of the matched elements to another, specified, set of elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A jQuery expression of elements to match. |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | prependTo |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").prependTo("#foo"); |
| result | <div foo"><p>I would like to say: /b></div><b>Hello</b>< |
| before | <p>I would like to say: </p><div /b></div><b>Hello</b>&l |
|
|
| cat | DOM/Manipulation |
|
| 63 |
Object
| Name | Value |
| short | Insert all of the matched elements before another, specified, set of elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A jQuery expression of elements to match. |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | insertBefore |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").insertBefore("#foo"); |
| result | <p>I would like to say: </p><div p;gt;Hello</div> |
| before | <div /div><p>I would like to say: </p> |
|
|
| cat | DOM/Manipulation |
|
| 64 |
Object
| Name | Value |
| short | Insert all of the matched elements after another, specified, set of elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A jQuery expression of elements to match. |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | insertAfter |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").insertAfter("#foo"); |
| result | <div /div><p>I would like to say: </p> |
| before | <p>I would like to say: </p><div p;gt;Hello</div> |
|
|
| cat | DOM/Manipulation |
|
| 65 |
Object
| Name | Value |
| short | Get the current CSS width of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS width of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | width |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").width(); |
| result | "300px" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 66 |
Object
| Name | Value |
| short | Set the CSS width of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | width |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").width("20px"); |
| result | <p tyle="width:20px;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 67 |
Object
| Name | Value |
| short | Get the current CSS height of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS height of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | height |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").height(); |
| result | "14px" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 68 |
Object
| Name | Value |
| short | Set the CSS height of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | height |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").height("20px"); |
| result | <p yle="height:20px;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 69 |
Object
| Name | Value |
| short | Get the current CSS top of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS top of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | top |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").top(); |
| result | "0px" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 70 |
Object
| Name | Value |
| short | Set the CSS top of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | top |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").top("20px"); |
| result | <p style="top:20px;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 71 |
Object
| Name | Value |
| short | Get the current CSS left of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS left of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | left |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").left(); |
| result | "0px" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 72 |
Object
| Name | Value |
| short | Set the CSS left of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | left |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").left("20px"); |
| result | <p style="left:20px;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 73 |
Object
| Name | Value |
| short | Get the current CSS position of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS position of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | position |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").position(); |
| result | "static" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 74 |
Object
| Name | Value |
| short | Set the CSS position of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| desc | Set the CSS position of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | position |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").position("relative"); |
| result | <p osition:relative;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 75 |
Object
| Name | Value |
| short | Get the current CSS float of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS float of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | float |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").float(); |
| result | "none" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 76 |
Object
| Name | Value |
| short | Set the CSS float of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| desc | Set the CSS float of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | float |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").float("left"); |
| result | <p tyle="float:left;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 77 |
Object
| Name | Value |
| short | Get the current CSS overflow of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS overflow of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | overflow |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").overflow(); |
| result | "none" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 78 |
Object
| Name | Value |
| short | Set the CSS overflow of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| desc | Set the CSS overflow of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | overflow |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").overflow("auto"); |
| result | <p e="overflow:auto;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 79 |
Object
| Name | Value |
| short | Get the current CSS color of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS color of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | color |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").color(); |
| result | "black" |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 80 |
Object
| Name | Value |
| short | Set the CSS color of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| desc | Set the CSS color of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | color |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").color("blue"); |
| result | <p tyle="color:blue;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 81 |
Object
| Name | Value |
| short | Get the current CSS background of the first matched element. |
| params | (empty Array)
|
| desc | Get the current CSS background of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | background |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").background(); |
| result | "blue" |
| before | <p "background:blue;">This is just a test.</p> |
|
|
| cat | CSS |
|
| 82 |
Object
| Name | Value |
| short | Set the CSS background of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the CSS property to the specified value. |
| name | val |
|
|
| desc | Set the CSS background of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | background |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").background("blue"); |
| result | <p "background:blue;">This is just a test.</p> |
| before | <p>This is just a test.</p> |
|
|
| cat | CSS |
|
| 83 |
Object
| Name | Value |
| short | Reduce the set of matched elements to a single element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Number |
| desc | The index of the element that you wish to limit to. |
| name | pos |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | eq |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").eq(1) |
| result | [ <p>So is this</p> ] |
| before | <p>This is just a ;/p><p>So is this</p> |
|
|
| cat | Core |
|
| 84 |
Object
| Name | Value |
| short | Reduce the set of matched elements to all elements before a given position. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Number |
| desc | Reduce the set to all elements below this position. |
| name | pos |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | lt |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").lt(1) |
| result | [ <p>This is just a test.</p> ] |
| before | <p>This is just a ;/p><p>So is this</p> |
|
|
| cat | Core |
|
| 85 |
Object
| Name | Value |
| short | Reduce the set of matched elements to all elements after a given position. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Number |
| desc | Reduce the set to all elements after this position. |
| name | pos |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | gt |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").gt(0) |
| result | [ <p>So is this</p> ] |
| before | <p>This is just a ;/p><p>So is this</p> |
|
|
| cat | Core |
|
| 86 |
Object
| Name | Value |
| short | Filter the set of elements to those that contain the specified text. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The string that will be contained within the text of an element. |
| name | str |
|
|
| desc | Filter the set of elements to those that contain the specified text. |
| tests | (empty Array)
|
| type | jQuery |
| name | contains |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").contains("test") |
| result | [ <p>This is just a test.</p> ] |
| before | <p>This is just a ;/p><p>So is this</p> |
|
|
| cat | DOM/Traversing |
|
| 87 |
Object
| Name | Value |
| short | Get the current value of the first matched element. |
| params | (empty Array)
|
| desc | Get the current value of the first matched element. |
| tests |
Array
| Index | Value |
| 0 | ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input element" ); |
|
| type | String |
| name | val |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("input").val(); |
| result | "some text" |
| before | <input type="text" value="some text"/> |
|
|
| cat | DOM/Attributes |
|
| 88 |
Object
| Name | Value |
| short | Set the value of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the value of every matched element. |
| tests |
Array
| Index | Value |
| 0 | .getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( .getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" ); |
|
| type | jQuery |
| name | val |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("input").value("test"); |
| result | <input type="text" value="test"/> |
| before | <input type="text" value="some text"/> |
|
|
| cat | DOM/Attributes |
|
| 89 |
Object
| Name | Value |
| short | Get the html contents of the first matched element. |
| params | (empty Array)
|
| desc | Get the html contents of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | html |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("div").html(); |
| result | <input/> |
| before | t/></div>amp;lt;div><input |
|
|
| cat | DOM/Attributes |
|
| 90 |
Object
| Name | Value |
| short | Set the html contents of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the html contents to the specified value. |
| name | val |
|
|
| desc | Set the html contents of every matched element. |
| tests |
Array
| Index | Value |
| 0 | var div = $("div");
/>var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" ); |
|
| type | jQuery |
| name | html |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | v").html("<b>new stuff</b>"); |
| result | iv><b>new /b></div> |
| before | t/></div>amp;lt;div><input |
|
|
| cat | DOM/Attributes |
|
| 91 |
Object
| Name | Value |
| short | Get the current id of the first matched element. |
| params | (empty Array)
|
| desc | Get the current id of the first matched element. |
| tests |
Array
| Index | Value |
| 0 | ok( t.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" ); |
|
| type | String |
| name | id |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("input").id(); |
| result | "test" |
| before | <input type="text" id="test" value="some text"/> |
|
|
| cat | DOM/Attributes |
|
| 92 |
Object
| Name | Value |
| short | Set the id of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the id of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | id |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("input").id("newid"); |
| result | <input type="text" id="newid" value="some text"/> |
| before | <input type="text" id="test" value="some text"/> |
|
|
| cat | DOM/Attributes |
|
| 93 |
Object
| Name | Value |
| short | Get the current title of the first matched element. |
| params | (empty Array)
|
| desc | Get the current title of the first matched element. |
| tests |
Array
| Index | Value |
| 0 | ok( ElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" ); |
|
| type | String |
| name | title |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").title(); |
| result | "my image" |
| before | <img src="test.jpg" title="my image"/> |
|
|
| cat | DOM/Attributes |
|
| 94 |
Object
| Name | Value |
| short | Set the title of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the title of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | title |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").title("new title"); |
| result | <img src="test.jpg" title="new image"/> |
| before | <img src="test.jpg" title="my image"/> |
|
|
| cat | DOM/Attributes |
|
| 95 |
Object
| Name | Value |
| short | Get the current name of the first matched element. |
| params | (empty Array)
|
| desc | Get the current name of the first matched element. |
| tests |
Array
| Index | Value |
| 0 | ok( etElementById('text1')).name() == "action", "Check for name" ); ok( $("#hidden1").name() == "hidden", "Check for name" ); ok( !$("#area1").name(), "Check for name" ); |
|
| type | String |
| name | name |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("input").name(); |
| result | "username" |
| before | <input type="text" name="username"/> |
|
|
| cat | DOM/Attributes |
|
| 96 |
Object
| Name | Value |
| short | Set the name of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the name of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | name |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("input").name("user"); |
| result | <input type="text" name="user"/> |
| before | <input type="text" name="username"/> |
|
|
| cat | DOM/Attributes |
|
| 97 |
Object
| Name | Value |
| short | Get the current href of the first matched element. |
| params | (empty Array)
|
| desc | Get the current href of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | href |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("a").href(); |
| result | "test.html" |
| before | <a href="test.html">my link</a> |
|
|
| cat | DOM/Attributes |
|
| 98 |
Object
| Name | Value |
| short | Set the href of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the href of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | href |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("a").href("test2.html"); |
| result | <a href="test2.html">my link</a> |
| before | <a href="test.html">my link</a> |
|
|
| cat | DOM/Attributes |
|
| 99 |
Object
| Name | Value |
| short | Get the current src of the first matched element. |
| params | (empty Array)
|
| desc | Get the current src of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | src |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").src(); |
| result | "test.jpg" |
| before | <img src="test.jpg" title="my image"/> |
|
|
| cat | DOM/Attributes |
|
| 100 |
Object
| Name | Value |
| short | Set the src of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the src of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | src |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("img").src("test2.jpg"); |
| result | <img src="test2.jpg" title="my image"/> |
| before | <img src="test.jpg" title="my image"/> |
|
|
| cat | DOM/Attributes |
|
| 101 |
Object
| Name | Value |
| short | Get the current rel of the first matched element. |
| params | (empty Array)
|
| desc | Get the current rel of the first matched element. |
| tests | (empty Array)
|
| type | String |
| name | rel |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("a").rel(); |
| result | "nofollow" |
| before | <a href="test.html" rel="nofollow">my link</a> |
|
|
| cat | DOM/Attributes |
|
| 102 |
Object
| Name | Value |
| short | Set the rel of every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | Set the property to the specified value. |
| name | val |
|
|
| desc | Set the rel of every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | rel |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("a").rel("nofollow"); |
| result | <a href="test.html" rel="nofollow">my link</a> |
| before | <a href="test.html">my link</a> |
|
|
| cat | DOM/Attributes |
|
| 103 |
Object
| Name | Value |
| short | Get a set of elements containing the unique parents of the matched set of elements. |
| params | (empty Array)
|
| desc | Get a set of elements containing the unique parents of the matched set of elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | parent |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").parent() |
| result | [ /p></div><p>Hello</p></div>amp;gt;Hello</p><p>Hello< ] |
| before | /p></div><p>Hello</p></div>amp;gt;Hello</p><p>Hello< |
|
|
| cat | DOM/Traversing |
|
| 104 |
Object
| Name | Value |
| short | Get a set of elements containing the unique parents of the matched set of elements, and filtered by an expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the parents with |
| name | expr |
|
|
| desc | Get a set of elements containing the unique parents of the matched set of elements, and filtered by an expression. |
| tests | (empty Array)
|
| type | jQuery |
| name | parent |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").parent(".selected") |
| result | [ <div ><p>Hello /p></div> ] |
| before | amp;lt;/div><divmp;gt;Hello</p></div><div ><p>Hello /p></div> |
|
|
| cat | DOM/Traversing |
|
| 105 |
Object
| Name | Value |
| short | Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element). |
| params | (empty Array)
|
| desc | Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element). |
| tests | (empty Array)
|
| type | jQuery |
| name | ancestors |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("span").ancestors() |
| result | [ p;gt;...</body>, mp;gt;...</div>, span></p>;lt;span>Hello</span></ ] |
| before | p;gt;<span>Hello;lt;/span></p><span>Hello;<span>Hello</span></p><span>Hellolt;div><p><span>Hello</span&gp;gt;<body><div>& y></html>mp;lt;/div></body></html&g |
|
|
| cat | DOM/Traversing |
|
| 106 |
Object
| Name | Value |
| short | Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the ancestors with |
| name | expr |
|
|
| desc | Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression. |
| tests | (empty Array)
|
| type | jQuery |
| name | ancestors |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("span").ancestors("p") |
| result | [ span></p>;lt;span>Hello</span></ ] |
| before | p;gt;<span>Hello;lt;/span></p><span>Hello;<span>Hello</span></p><span>Hellolt;div><p><span>Hello</span&gp;gt;<body><div>& y></html>mp;lt;/div></body></html&g |
|
|
| cat | DOM/Traversing |
|
| 107 |
Object
| Name | Value |
| short | Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element). |
| params | (empty Array)
|
| desc | Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element). |
| tests | (empty Array)
|
| type | jQuery |
| name | parents |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("span").ancestors() |
| result | [ p;gt;...</body>, mp;gt;...</div>, span></p>;lt;span>Hello</span></ ] |
| before | p;gt;<span>Hello;lt;/span></p><span>Hello;<span>Hello</span></p><span>Hellolt;div><p><span>Hello</span&gp;gt;<body><div>& y></html>mp;lt;/div></body></html&g |
|
|
| cat | DOM/Traversing |
|
| 108 |
Object
| Name | Value |
| short | Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the ancestors with |
| name | expr |
|
|
| desc | Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression. |
| tests | (empty Array)
|
| type | jQuery |
| name | parents |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("span").ancestors("p") |
| result | [ span></p>;lt;span>Hello</span></ ] |
| before | p;gt;<span>Hello;lt;/span></p><span>Hello;<span>Hello</span></p><span>Hellolt;div><p><span>Hello</span&gp;gt;<body><div>& y></html>mp;lt;/div></body></html&g |
|
|
| cat | DOM/Traversing |
|
| 109 |
Object
| Name | Value |
| short | Get a set of elements containing the unique next siblings of each of the matched set of elements. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | next |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").next() |
| result | [ <p>Hello Again</p>, amp;gt;<span>And an></div> ] |
| before | ><p>Hellomp;lt;p>Hello</p&a amp;gt;<span>And</p><div&g an></div> |
|
|
| cat | DOM/Traversing |
|
| 110 |
Object
| Name | Value |
| short | Get a set of elements containing the unique next siblings of each of the matched set of elements, and filtered by an expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the next Elements with |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | next |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").next(".selected") |
| result | [ <p class="selected">Hello Again</p> ] |
| before | llo</p><p class="selected">Hello amp;gt;<span>And</p><div&g an></div> |
|
|
| cat | DOM/Traversing |
|
| 111 |
Object
| Name | Value |
| short | Get a set of elements containing the unique previous siblings of each of the matched set of elements. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | prev |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").prev() |
| result | [ p;gt;<span>Hello an></div> ] |
| before | p;gt;<span>Hellomp;lt;/p><div><span> iv><p>Andamp;lt;/span></div& Again</p> |
|
|
| cat | DOM/Traversing |
|
| 112 |
Object
| Name | Value |
| short | Get a set of elements containing the unique previous siblings of each of the matched set of elements, and filtered by an expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the previous Elements with |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | prev |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").previous(".selected") |
| result | [ an></div>t;span>Hello</span></div&am ] |
| before | ;</div><pp;gt;Hello</span></div><p;lt;div><span> class="selected">Hello /p><p>And Again</p> |
|
|
| cat | DOM/Traversing |
|
| 113 |
Object
| Name | Value |
| short | Get a set of elements containing all of the unique siblings of each of the matched set of elements. |
| params | (empty Array)
|
| desc | Get a set of elements containing all of the unique siblings of each of the matched set of elements. |
| tests |
Array
| Index | Value |
| 0 | isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); |
|
| type | jQuery |
| name | siblings |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("div").siblings() |
| result | [ mp;gt;Hello</p>, <p>And Again</p> ] |
| before | p;gt;<span>Hellomp;lt;/p><div><span> iv><p>Andamp;lt;/span></div& Again</p> |
|
|
| cat | DOM/Traversing |
|
| 114 |
Object
| Name | Value |
| 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. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the sibling Elements with |
| name | expr |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | isSet( dp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( #sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" ); |
|
| type | jQuery |
| name | siblings |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("div").siblings(".selected") |
| result | [ <p class="selected">Hello Again</p> ] |
| before | ;</div><pp;gt;Hello</span></div><p;lt;div><span> class="selected">Hello /p><p>And Again</p> |
|
|
| cat | DOM/Traversing |
|
| 115 |
Object
| Name | Value |
| short | Get a set of elements containing all of the unique children of each of the matched set of elements. |
| params | (empty Array)
|
| desc | Get a set of elements containing all of the unique children of each of the matched set of elements. |
| tests |
Array
| Index | Value |
| 0 | isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); |
|
| type | jQuery |
| name | children |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("div").children() |
| result | [ <span>Hello Again</span> ] |
| before | p;gt;<span>Hellomp;lt;/p><div><span> iv><p>Andamp;lt;/span></div& Again</p> |
|
|
| cat | DOM/Traversing |
|
| 116 |
Object
| Name | Value |
| 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. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An expression to filter the child Elements with |
| name | expr |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | isSet( oo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" ); |
|
| type | jQuery |
| name | children |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("div").children(".selected") |
| result | [ <p class="selected">Hello Again</p> ] |
| before | </span><pp;gt;<span>Hello</span& class="selected">Hello /p><p>And /p></div> |
|
|
| cat | DOM/Traversing |
|
| 117 |
Object
| Name | Value |
| short | Remove an attribute from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The name of the attribute to remove. |
| name | name |
|
|
| desc | Remove an attribute from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | removeAttr |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | input").removeAttr("disabled") |
| result | <input/> |
| before | <input disabled="disabled"/> |
|
|
| cat | DOM |
|
| 118 |
Object
| Name | Value |
| short | Displays each of the set of matched elements if they are hidden. |
| params | (empty Array)
|
| desc | Displays each of the set of matched elements if they are hidden. |
| tests |
Array
| Index | Value |
| 0 | var pass = true, div = $("div");
/> if ( this.style.display == "none" ) pass = false; }); ok( pass, "Show" ); |
|
| type | jQuery |
| name | show |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").show() |
| result | [ <p style="display: amp;gt;Hello</p> ] |
| before | <p style="display: amp;gt;Hello</p> |
|
|
| cat | Effects |
|
| 119 |
Object
| Name | Value |
| short | Hides each of the set of matched elements if they are shown. |
| params | (empty Array)
|
| desc | Hides each of the set of matched elements if they are shown. |
| tests | (empty Array)
|
| type | jQuery |
| name | hide |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").hide() |
| result | [ <p style="display: amp;gt;Hello</p> ]
var pass = true, div = $("div");
/> if ( this.style.display != "none" ) pass = false; }); ok( pass, "Hide" ); |
| before | amp;gt;Hello</p> |
|
|
| cat | Effects |
|
| 120 |
Object
| Name | Value |
| short | Toggles each of the set of matched elements. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | toggle |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").toggle() |
| result | [ <p style="display: mp;gt;Hello</p>, <p style="display: block">Hello Again</p> ] |
| before | llo</p><p style="display: none">Hello Again</p> |
|
|
| cat | Effects |
|
| 121 |
Object
| Name | Value |
| short | Adds the specified class to each of the set of matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A CSS class to add to the elements |
| name | class |
|
|
| desc | Adds the specified class to each of the set of matched elements. |
| tests |
Array
| Index | Value |
| 0 | var div = $("div"); div.addClass("test"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( t(i).className.indexOf("test") == -1 ) pass = false; } ok( pass, "Add Class" ); |
|
| type | jQuery |
| name | addClass |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").addClass("selected") |
| result | [ <p amp;gt;Hello</p> ] |
| before | amp;gt;Hello</p> |
|
|
| cat | DOM |
|
| 122 |
Object
| Name | Value |
| short | Removes the specified class from the set of matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A CSS class to remove from the elements |
| name | class |
|
|
| desc | Removes the specified class from the set of matched elements. |
| tests |
Array
| Index | Value |
| 0 | var div = $("div").addClass("test"); div.removeClass("test"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( t(i).className.indexOf("test") != -1 ) pass = false; } ok( pass, "Remove Class" );
reset();
var div = ass("foo").addClass("bar"); ("div").addClass("test").addCla ("bar").removeClass("foo"); emoveClass("test").removeClass("bar") />var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( lassName.match(/test|bar|foo/) ) pass = false; } ok( pass, "Remove multiple classes" ); |
|
| type | jQuery |
| name | removeClass |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").removeClass("selected") |
| result | [ amp;gt;Hello</p> ] |
| before | <p amp;gt;Hello</p> |
|
|
| cat | DOM |
|
| 123 |
Object
| Name | Value |
| short | Adds the specified class if it is present, removes it if it is not present. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A CSS class with which to toggle the elements |
| name | class |
|
|
| desc | Adds the specified class if it is present, removes it if it is not present. |
| tests | (empty Array)
|
| type | jQuery |
| name | toggleClass |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").toggleClass("selected") |
| result | [ <p mp;gt;Hello</p>, <p>Hello Again</p> ] |
| before | llo</p><p class="selected">Hello Again</p> |
|
|
| cat | DOM |
|
| 124 |
Object
| Name | Value |
| short | Removes all matched elements from the DOM. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | remove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").remove(); |
| result | how are |
| before | amp;gt;Hello</p> how are >you?</p> |
|
|
| cat | DOM/Manipulation |
|
| 125 |
Object
| Name | Value |
| short | Removes only elements (out of the list of matched elements) that match the specified jQuery expression. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | A jQuery expression to filter elements by. |
| name | expr |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | remove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").remove(".hello"); |
| result | how are >you?</p> |
| before | <p amp;gt;Hello</p> how are >you?</p> |
|
|
| cat | DOM/Manipulation |
|
| 126 |
Object
| Name | Value |
| short | Removes all child nodes from the set of matched elements. |
| params | (empty Array)
|
| desc | Removes all child nodes from the set of matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | empty |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").empty() |
| result | [ lt;p></p> ] |
| before | <p>Hello, gt;Person</span> <a href="#">and t;/a></p> |
|
|
| cat | DOM/Manipulation |
|
| 127 |
Object
| Name | Value |
| short | Binds a handler to a particular event (like click) for each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An event type |
| name | type |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the event on each of the set of matched elements |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | bind |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").bind( "click", function() { alert( $(this).text() ); } ) |
| result | alert("Hello") |
| before | amp;gt;Hello</p> |
|
| 1 |
Object
| Name | Value |
| desc | Cancel a default action and prevent it from bubbling by returning false from your function. |
| code | $("form").bind( "submit", function() { return false; } ) |
|
| 2 |
Object
| Name | Value |
| desc | Cancel only the default action by using the preventDefault method. |
| code | $("form").bind( "submit", function(event) { event.preventDefault(); } ); |
|
| 3 |
Object
| Name | Value |
| desc | Stop only an event from bubbling by using the stopPropagation method. |
| code | $("form").bind( "submit", function(event) { event.stopPropagation(); } ) |
|
|
| cat | Events |
|
| 128 |
Object
| Name | Value |
| short | The opposite of bind, removes a bound event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An event type |
| name | type |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the event on each of the set of matched elements |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unbind |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unbind( "click", function() { alert("Hello"); } ) |
| result | [ amp;gt;Hello</p> ] |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events |
|
| 129 |
Object
| Name | Value |
| short | Removes all bound events of a particular type from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An event type |
| name | type |
|
|
| desc | Removes all bound events of a particular type from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unbind |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unbind( "click" ) |
| result | [ amp;gt;Hello</p> ] |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events |
|
| 130 |
Object
| Name | Value |
| short | Removes all bound events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unbind |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unbind() |
| result | [ amp;gt;Hello</p> ] |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events |
|
| 131 |
Object
| Name | Value |
| short | Trigger a type of event on every matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | An event type to trigger. |
| name | type |
|
|
| desc | Trigger a type of event on every matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | trigger |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").trigger("click") |
| result | alert('hello') |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events |
|
| 132 |
Object
| Name | Value |
| short | Toggle between two function calls every other click. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute on every even click. |
| name | even |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute on every odd click. |
| name | odd |
|
|
| 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. |
| tests |
Array
| Index | Value |
| 0 | var count = 0; var fn1 = function() { count++; } var fn2 = function() { count--; } var link = $('#mark'); link.click().toggle(fn1, ().click().click().click(); />ok( count == 1, "Check for toggle(fn, fn)" ); |
|
| type | jQuery |
| name | toggle |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").toggle(function(){ this).addClass("selected"); />},function(){ s).removeClass("selected"); />}); |
|
|
| cat | Events |
|
| 133 |
Object
| Name | Value |
| short | A method for simulating hovering (moving the mouse on, and off, an object). |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to fire whenever the mouse is moved over a matched element. |
| name | over |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | The function to fire whenever the mouse is moved off of a matched element. |
| name | out |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | hover |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").hover(function(){ $(this).addClass("over"); },function(){ $(this).addClass("out"); }); |
|
|
| cat | Events |
|
| 134 |
Object
| Name | Value |
| short | Bind a function to be executed whenever the DOM is ready to be traversed and manipulated. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to be executed when the DOM is ready. |
| name | fn |
|
|
| 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 <body> onload event handler, otherwise $(document).ready() may not fire.
You can have as many $(document).ready events on your page as you like. |
| tests | (empty Array)
|
| type | jQuery |
| name | ready |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $(document).ready(function(){ Your code here... }); |
|
|
| cat | Events |
|
| 135 |
Object
| Name | Value |
| short | Bind a function to the scroll event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the scroll event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the scroll event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | scroll |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").scroll( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 136 |
Object
| Name | Value |
| short | Trigger the scroll event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | scroll |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").scroll(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 137 |
Object
| Name | Value |
| short | Bind a function to the scroll event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the scroll event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onescroll |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onescroll( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first scroll |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 138 |
Object
| Name | Value |
| short | Removes a bound scroll event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the scroll event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unscroll |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unscroll( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 139 |
Object
| Name | Value |
| short | Removes all bound scroll events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound scroll events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unscroll |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unscroll(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 140 |
Object
| Name | Value |
| short | Bind a function to the submit event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the submit event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the submit event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | submit |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").submit( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 141 |
Object
| Name | Value |
| short | Trigger the submit event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | submit |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").submit(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 142 |
Object
| Name | Value |
| short | Bind a function to the submit event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the submit event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onesubmit |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onesubmit( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first submit |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 143 |
Object
| Name | Value |
| short | Removes a bound submit event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the submit event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unsubmit |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unsubmit( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 144 |
Object
| Name | Value |
| short | Removes all bound submit events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound submit events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unsubmit |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unsubmit(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 145 |
Object
| Name | Value |
| short | Bind a function to the focus event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the focus event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the focus event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | focus |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").focus( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 146 |
Object
| Name | Value |
| short | Trigger the focus event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | focus |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").focus(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 147 |
Object
| Name | Value |
| short | Bind a function to the focus event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the focus event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onefocus |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onefocus( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first focus |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 148 |
Object
| Name | Value |
| short | Removes a bound focus event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the focus event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unfocus |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unfocus( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 149 |
Object
| Name | Value |
| short | Removes all bound focus events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound focus events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unfocus |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unfocus(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 150 |
Object
| Name | Value |
| short | Bind a function to the keydown event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the keydown event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the keydown event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | keydown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").keydown( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 151 |
Object
| Name | Value |
| short | Trigger the keydown event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | keydown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").keydown(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 152 |
Object
| Name | Value |
| short | Bind a function to the keydown event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the keydown event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onekeydown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onekeydown( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first keydown |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 153 |
Object
| Name | Value |
| short | Removes a bound keydown event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the keydown event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unkeydown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unkeydown( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 154 |
Object
| Name | Value |
| short | Removes all bound keydown events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound keydown events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unkeydown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unkeydown(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 155 |
Object
| Name | Value |
| short | Bind a function to the dblclick event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the dblclick event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the dblclick event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | dblclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").dblclick( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 156 |
Object
| Name | Value |
| short | Trigger the dblclick event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | dblclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").dblclick(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 157 |
Object
| Name | Value |
| short | Bind a function to the dblclick event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the dblclick event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onedblclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onedblclick( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first dblclick |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 158 |
Object
| Name | Value |
| short | Removes a bound dblclick event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the dblclick event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | undblclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").undblclick( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 159 |
Object
| Name | Value |
| short | Removes all bound dblclick events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound dblclick events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | undblclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").undblclick(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 160 |
Object
| Name | Value |
| short | Bind a function to the keypress event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the keypress event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the keypress event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | keypress |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").keypress( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 161 |
Object
| Name | Value |
| short | Trigger the keypress event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | keypress |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").keypress(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 162 |
Object
| Name | Value |
| short | Bind a function to the keypress event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the keypress event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onekeypress |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onekeypress( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first keypress |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 163 |
Object
| Name | Value |
| short | Removes a bound keypress event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the keypress event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unkeypress |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unkeypress( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 164 |
Object
| Name | Value |
| short | Removes all bound keypress events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound keypress events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unkeypress |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unkeypress(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 165 |
Object
| Name | Value |
| short | Bind a function to the error event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the error event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the error event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | error |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").error( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 166 |
Object
| Name | Value |
| short | Trigger the error event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | error |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").error(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 167 |
Object
| Name | Value |
| short | Bind a function to the error event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the error event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneerror |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneerror( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first error |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 168 |
Object
| Name | Value |
| short | Removes a bound error event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the error event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unerror |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unerror( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 169 |
Object
| Name | Value |
| short | Removes all bound error events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound error events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unerror |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unerror(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 170 |
Object
| Name | Value |
| short | Bind a function to the blur event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the blur event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the blur event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | blur |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").blur( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 171 |
Object
| Name | Value |
| short | Trigger the blur event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | blur |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").blur(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 172 |
Object
| Name | Value |
| short | Bind a function to the blur event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the blur event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneblur |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneblur( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first blur |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 173 |
Object
| Name | Value |
| short | Removes a bound blur event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the blur event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unblur |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unblur( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 174 |
Object
| Name | Value |
| short | Removes all bound blur events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound blur events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unblur |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unblur(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/UI |
|
| 175 |
Object
| Name | Value |
| short | Bind a function to the load event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the load event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the load event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | load |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").load( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 176 |
Object
| Name | Value |
| cat | Events/Browser |
| type | jQuery |
| 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.
Marked as private: Calling load() without arguments throws exception because the ajax load does not handle it. |
| params | (empty Array)
|
| short | Trigger the load event of each matched element. |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").load(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| tests | (empty Array)
|
| private | 1 |
| name | load |
|
| 177 |
Object
| Name | Value |
| short | Bind a function to the load event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the load event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneload( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first load |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 178 |
Object
| Name | Value |
| short | Removes a bound load event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the load event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unload( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 179 |
Object
| Name | Value |
| short | Removes all bound load events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound load events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unload(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 180 |
Object
| Name | Value |
| short | Bind a function to the select event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the select event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the select event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | select |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").select( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 181 |
Object
| Name | Value |
| short | Trigger the select event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | select |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").select(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 182 |
Object
| Name | Value |
| short | Bind a function to the select event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the select event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneselect |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneselect( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first select |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 183 |
Object
| Name | Value |
| short | Removes a bound select event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the select event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unselect |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unselect( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 184 |
Object
| Name | Value |
| short | Removes all bound select events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound select events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unselect |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unselect(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 185 |
Object
| Name | Value |
| short | Bind a function to the mouseup event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mouseup event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mouseup event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | mouseup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mouseup( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 186 |
Object
| Name | Value |
| short | Trigger the mouseup event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | mouseup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mouseup(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 187 |
Object
| Name | Value |
| short | Bind a function to the mouseup event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mouseup event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | onemouseup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onemouseup( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first mouseup |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 188 |
Object
| Name | Value |
| short | Removes a bound mouseup event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the mouseup event on each of the matched elements. |
| name | fn |
|
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmouseup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmouseup( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 189 |
Object
| Name | Value |
| short | Removes all bound mouseup events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound mouseup events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmouseup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmouseup(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 190 |
Object
| Name | Value |
| short | Bind a function to the unload event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the unload event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the unload event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | unload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unload( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 191 |
Object
| Name | Value |
| short | Trigger the unload event of each matched element. |
| params | (empty Array)
|
| 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. |
| tests | (empty Array)
|
| type | jQuery |
| name | unload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unload(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 192 |
Object
| Name | Value |
| short | Bind a function to the unload event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the unload event on each of the matched elements. |
| name | fn |
|
|
| 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). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneunload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneunload( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first unload |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 193 |
Object
| Name | Value |
| short | Removes a bound unload event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the unload event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound unload event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | ununload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").ununload( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 194 |
Object
| Name | Value |
| short | Removes all bound unload events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound unload events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | ununload |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").ununload(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 195 |
Object
| Name | Value |
| short | Bind a function to the change event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the change event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the change event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | change |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").change( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 196 |
Object
| Name | Value |
| short | Trigger the change event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the change event of each matched element. This causes all of the functions that have been bound to thet change event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | change |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").change(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 197 |
Object
| Name | Value |
| short | Bind a function to the change event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the change event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the change event of each matched element, which will only be executed once. Unlike a call to the normal .change() method, calling .onechange() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | onechange |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onechange( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first change |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 198 |
Object
| Name | Value |
| short | Removes a bound change event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the change event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound change event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unchange |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unchange( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 199 |
Object
| Name | Value |
| short | Removes all bound change events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound change events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unchange |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unchange(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Form |
|
| 200 |
Object
| Name | Value |
| short | Bind a function to the mouseout event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mouseout event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mouseout event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | mouseout |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mouseout( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 201 |
Object
| Name | Value |
| short | Trigger the mouseout event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the mouseout event of each matched element. This causes all of the functions that have been bound to thet mouseout event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | mouseout |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mouseout(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 202 |
Object
| Name | Value |
| short | Bind a function to the mouseout event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mouseout event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mouseout event of each matched element, which will only be executed once. Unlike a call to the normal .mouseout() method, calling .onemouseout() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | onemouseout |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onemouseout( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first mouseout |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 203 |
Object
| Name | Value |
| short | Removes a bound mouseout event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the mouseout event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound mouseout event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmouseout |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmouseout( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 204 |
Object
| Name | Value |
| short | Removes all bound mouseout events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound mouseout events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmouseout |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmouseout(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 205 |
Object
| Name | Value |
| short | Bind a function to the keyup event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the keyup event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the keyup event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | keyup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").keyup( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 206 |
Object
| Name | Value |
| short | Trigger the keyup event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the keyup event of each matched element. This causes all of the functions that have been bound to thet keyup event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | keyup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").keyup(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 207 |
Object
| Name | Value |
| short | Bind a function to the keyup event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the keyup event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the keyup event of each matched element, which will only be executed once. Unlike a call to the normal .keyup() method, calling .onekeyup() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | onekeyup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onekeyup( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first keyup |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 208 |
Object
| Name | Value |
| short | Removes a bound keyup event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the keyup event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound keyup event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unkeyup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unkeyup( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 209 |
Object
| Name | Value |
| short | Removes all bound keyup events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound keyup events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unkeyup |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unkeyup(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Keyboard |
|
| 210 |
Object
| Name | Value |
| short | Bind a function to the click event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the click event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the click event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | click |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").click( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 211 |
Object
| Name | Value |
| short | Trigger the click event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the click event of each matched element. This causes all of the functions that have been bound to thet click event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | click |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").click(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 212 |
Object
| Name | Value |
| short | Bind a function to the click event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the click event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the click event of each matched element, which will only be executed once. Unlike a call to the normal .click() method, calling .oneclick() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneclick( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first click |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 213 |
Object
| Name | Value |
| short | Removes a bound click event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the click event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound click event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unclick( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 214 |
Object
| Name | Value |
| short | Removes all bound click events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound click events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unclick |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unclick(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 215 |
Object
| Name | Value |
| short | Bind a function to the resize event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the resize event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the resize event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | resize |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").resize( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 216 |
Object
| Name | Value |
| short | Trigger the resize event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the resize event of each matched element. This causes all of the functions that have been bound to thet resize event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | resize |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").resize(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 217 |
Object
| Name | Value |
| short | Bind a function to the resize event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the resize event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the resize event of each matched element, which will only be executed once. Unlike a call to the normal .resize() method, calling .oneresize() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | oneresize |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").oneresize( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first resize |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 218 |
Object
| Name | Value |
| short | Removes a bound resize event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the resize event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound resize event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unresize |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unresize( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 219 |
Object
| Name | Value |
| short | Removes all bound resize events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound resize events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unresize |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unresize(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Browser |
|
| 220 |
Object
| Name | Value |
| short | Bind a function to the mousemove event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mousemove event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mousemove event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | mousemove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mousemove( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 221 |
Object
| Name | Value |
| short | Trigger the mousemove event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the mousemove event of each matched element. This causes all of the functions that have been bound to thet mousemove event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | mousemove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mousemove(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 222 |
Object
| Name | Value |
| short | Bind a function to the mousemove event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mousemove event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mousemove event of each matched element, which will only be executed once. Unlike a call to the normal .mousemove() method, calling .onemousemove() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | onemousemove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onemousemove( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first mousemove |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 223 |
Object
| Name | Value |
| short | Removes a bound mousemove event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the mousemove event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound mousemove event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmousemove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmousemove( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 224 |
Object
| Name | Value |
| short | Removes all bound mousemove events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound mousemove events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmousemove |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmousemove(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 225 |
Object
| Name | Value |
| short | Bind a function to the mousedown event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mousedown event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mousedown event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | mousedown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mousedown( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 226 |
Object
| Name | Value |
| short | Trigger the mousedown event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the mousedown event of each matched element. This causes all of the functions that have been bound to thet mousedown event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | mousedown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mousedown(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 227 |
Object
| Name | Value |
| short | Bind a function to the mousedown event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mousedown event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mousedown event of each matched element, which will only be executed once. Unlike a call to the normal .mousedown() method, calling .onemousedown() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | onemousedown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onemousedown( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first mousedown |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 228 |
Object
| Name | Value |
| short | Removes a bound mousedown event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the mousedown event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound mousedown event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmousedown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmousedown( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 229 |
Object
| Name | Value |
| short | Removes all bound mousedown events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound mousedown events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmousedown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmousedown(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 230 |
Object
| Name | Value |
| short | Bind a function to the mouseover event of each matched element. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mousedown event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mouseover event of each matched element. |
| tests | (empty Array)
|
| type | jQuery |
| name | mouseover |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mouseover( function() { alert("Hello"); } ); |
| result | <p amp;gt;Hello</p> |
| before | amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 231 |
Object
| Name | Value |
| short | Trigger the mouseover event of each matched element. |
| params | (empty Array)
|
| desc | Trigger the mouseover event of each matched element. This causes all of the functions that have been bound to thet mousedown event to be executed. |
| tests | (empty Array)
|
| type | jQuery |
| name | mouseover |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").mouseover(); |
| result | alert('Hello'); |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 232 |
Object
| Name | Value |
| short | Bind a function to the mouseover event of each matched element, which will only be executed once. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to bind to the mouseover event on each of the matched elements. |
| name | fn |
|
|
| desc | Bind a function to the mouseover event of each matched element, which will only be executed once. Unlike a call to the normal .mouseover() method, calling .onemouseover() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). |
| tests | (empty Array)
|
| type | jQuery |
| name | onemouseover |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").onemouseover( function() { alert("Hello"); } ); |
| result | alert('Hello'); // Only executed for the first mouseover |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 233 |
Object
| Name | Value |
| short | Removes a bound mouseover event from each of the matched elements. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | A function to unbind from the mouseover event on each of the matched elements. |
| name | fn |
|
|
| desc | Removes a bound mouseover event from each of the matched elements. You must pass the identical function that was used in the original bind method. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmouseover |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmouseover( myFunction ); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 234 |
Object
| Name | Value |
| short | Removes all bound mouseover events from each of the matched elements. |
| params | (empty Array)
|
| desc | Removes all bound mouseover events from each of the matched elements. |
| tests | (empty Array)
|
| type | jQuery |
| name | unmouseover |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").unmouseover(); |
| result | amp;gt;Hello</p> |
| before | <p amp;gt;Hello</p> |
|
|
| cat | Events/Mouse |
|
| 235 |
Object
| Name | Value |
| short | |
| params | (empty Array)
|
| desc | |
| tests |
Array
| Index | Value |
| 0 | var count; // ignore load var e = scroll,unload,click,dblclick," + n,mouseup,mousemove,mouseover,mouseout,chan +
/>var handler1 = function(event) { count++; }; var handler2 = function(event) { count++; }; for( var i=0; i < e.length; i++) { var event = e[i]; count = 0; // bind handler
document)[event](handler2); nt)["one"+event](handler1); /> // call event two times $(document)[event](); $(document)[event](); // unbind events
/> // call once more $(document)[event]();
// remove all handlers
/> // call once more $(document)[event](); // assert count ok( count == 6, 'Checking event ' + event); } |
|
| name | eventTesting |
| private | 1 |
| examples | (empty Array)
|
| cat | Events |
|
| 236 |
Object
| Name | Value |
| short | Show all matched elements using a graceful animation. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Show all matched elements using a graceful animation. The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed. |
| tests | (empty Array)
|
| type | jQuery |
| name | show |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").show("slow"); |
|
|
| cat | Effects/Animations |
|
| 237 |
Object
| Name | Value |
| short | Show all matched elements using a graceful animation and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Show all matched elements using a graceful animation and firing a callback function after completion. The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed. |
| tests | (empty Array)
|
| type | jQuery |
| name | show |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | p").show("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 238 |
Object
| Name | Value |
| short | Hide all matched elements using a graceful animation. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Hide all matched elements using a graceful animation. The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed. |
| tests | (empty Array)
|
| type | jQuery |
| name | hide |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").hide("slow"); |
|
|
| cat | Effects/Animations |
|
| 239 |
Object
| Name | Value |
| short | Hide all matched elements using a graceful animation and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Hide all matched elements using a graceful animation and firing a callback function after completion. The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed. |
| tests | (empty Array)
|
| type | jQuery |
| name | hide |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | p").hide("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 240 |
Object
| Name | Value |
| short | Reveal all matched elements by adjusting their height. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Reveal all matched elements by adjusting their height. Only the height is adjusted for this animation, causing all matched elements to be revealed in a "sliding" manner. |
| tests | (empty Array)
|
| type | jQuery |
| name | slideDown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").slideDown("slow"); |
|
|
| cat | Effects/Animations |
|
| 241 |
Object
| Name | Value |
| short | Reveal all matched elements by adjusting their height and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Reveal all matched elements by adjusting their height and firing a callback function after completion. Only the height is adjusted for this animation, causing all matched elements to be revealed in a "sliding" manner. |
| tests | (empty Array)
|
| type | jQuery |
| name | slideDown |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | lideDown("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 242 |
Object
| Name | Value |
| short | Hide all matched elements by adjusting their height. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Hide all matched elements by adjusting their height. Only the height is adjusted for this animation, causing all matched elements to be hidden in a "sliding" manner. |
| tests | (empty Array)
|
| type | jQuery |
| name | slideUp |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").slideUp("slow"); |
|
|
| cat | Effects/Animations |
|
| 243 |
Object
| Name | Value |
| short | Hide all matched elements by adjusting their height and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Hide all matched elements by adjusting their height and firing a callback function after completion. Only the height is adjusted for this animation, causing all matched elements to be hidden in a "sliding" manner. |
| tests | (empty Array)
|
| type | jQuery |
| name | slideUp |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | .slideUp("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 244 |
Object
| Name | Value |
| short | Toggle the visibility of all matched elements by adjusting their height. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Toggle the visibility of all matched elements by adjusting their height. Only the height is adjusted for this animation, causing all matched elements to be hidden in a "sliding" manner. |
| tests | (empty Array)
|
| type | jQuery |
| name | slideToggle |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").slideToggle("slow"); |
|
|
| cat | Effects/Animations |
|
| 245 |
Object
| Name | Value |
| short | Toggle the visibility of all matched elements by adjusting their height and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Toggle the visibility of all matched elements by adjusting their height and firing a callback function after completion. Only the height is adjusted for this animation, causing all matched elements to be hidden in a "sliding" manner. |
| tests | (empty Array)
|
| type | jQuery |
| name | slideToggle |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | deToggle("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 246 |
Object
| Name | Value |
| short | Fade in all matched elements by adjusting their opacity. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Fade in all matched elements by adjusting their opacity. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. |
| tests | (empty Array)
|
| type | jQuery |
| name | fadeIn |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").fadeIn("slow"); |
|
|
| cat | Effects/Animations |
|
| 247 |
Object
| Name | Value |
| short | Fade in all matched elements by adjusting their opacity and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Fade in all matched elements by adjusting their opacity and firing a callback function after completion. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. |
| tests | (empty Array)
|
| type | jQuery |
| name | fadeIn |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ).fadeIn("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 248 |
Object
| Name | Value |
| short | Fade out all matched elements by adjusting their opacity. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
|
| desc | Fade out all matched elements by adjusting their opacity. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. |
| tests | (empty Array)
|
| type | jQuery |
| name | fadeOut |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").fadeOut("slow"); |
|
|
| cat | Effects/Animations |
|
| 249 |
Object
| Name | Value |
| short | Fade out all matched elements by adjusting their opacity and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Fade out all matched elements by adjusting their opacity and firing a callback function after completion. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. |
| tests | (empty Array)
|
| type | jQuery |
| name | fadeOut |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | .fadeOut("slow",function(){ /> alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 250 |
Object
| Name | Value |
| short | Fade the opacity of all matched elements to a specified opacity. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Number |
| desc | The opacity to fade to (a number from 0 to 1). |
| name | opacity |
|
|
| desc | Fade the opacity of all matched elements to a specified opacity. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. |
| tests | (empty Array)
|
| type | jQuery |
| name | fadeTo |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").fadeTo("slow", 0.5); |
|
|
| cat | Effects/Animations |
|
| 251 |
Object
| Name | Value |
| short | Fade the opacity of all matched elements to a specified opacity and firing a callback function after completion. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 1 |
Object
| Name | Value |
| type | Number |
| desc | The opacity to fade to (a number from 0 to 1). |
| name | opacity |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | Fade the opacity of all matched elements to a specified opacity and firing a callback function after completion. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. |
| tests | (empty Array)
|
| type | jQuery |
| name | fadeTo |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").fadeTo("slow", 0.5, function(){ alert("Animation Done."); }); |
|
|
| cat | Effects/Animations |
|
| 252 |
Object
| Name | Value |
| short | A function for making your own, custom, animations. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Hash |
| desc | A set of style attributes that you wish to animate, and to what end. |
| name | params |
|
| 1 |
Object
| Name | Value |
| type | Object |
| desc | A string representing one of
the three predefined speeds ("slow", "normal", or "fast") or the number
of milliseconds to run the animation (e.g. 1000). |
| name | speed |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the animation completes. |
| name | callback |
|
|
| desc | A function for making your own, custom, animations. The key aspect of this function is the object of style properties that will be animated, and to what end. Each key within the object represents a style property that will also be animated (for example: "height", "top", or "opacity").
The value associated with the key represents to what end the property will be animated. If a number is provided as the value, then the style property will be transitioned from its current state to that new number. Oterwise if the string "hide", "show", or "toggle" is provided, a default animation will be constructed for that property. |
| tests | (empty Array)
|
| type | jQuery |
| name | animate |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("p").animate({ height: 'toggle', opacity: 'toggle' }, "slow"); |
|
| 1 |
Object
| Name | Value |
| code | $("p").animate({ left: 50, opacity: 'show' }, 500); |
|
|
| cat | Effects/Animations |
|
| 253 |
Object
| Name | Value |
| short | Load HTML from a remote file and inject it into the DOM, only if it's been modified by the server. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the HTML file to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs that will be sent to the server. |
| name | params |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Load HTML from a remote file and inject it into the DOM, only if it's been modified by the server. |
| tests | (empty Array)
|
| type | jQuery |
| name | loadIfModified |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | ).loadIfModified("feeds.html") |
| result | <div ;b>45</b> feeds found.</div> |
| before | <div s"></div> |
|
|
| cat | AJAX |
|
| 254 |
Object
| Name | Value |
| short | Load HTML from a remote file and inject it into the DOM. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the HTML file to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs that will be sent to the server. |
| name | params |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Load HTML from a remote file and inject it into the DOM. |
| tests |
Array
| Index | Value |
| 0 | stop(); function() { ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); start(); }); |
| 1 | stop(); // check if load can be called with only url
/>$.get("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); start(); }); |
|
| type | jQuery |
| name | load |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $("#feeds").load("feeds.html") |
| result | <div ;b>45</b> feeds found.</div> |
| before | <div s"></div> |
|
| 1 |
Object
| Name | Value |
| desc | Same as above, but with an additional parameter and a callback that is executed when the data was loaded. |
| code | #feeds").load("feeds.html", /> {test: true}, function() { alert("load is done"); } ); |
|
|
| cat | AJAX |
|
| 255 |
Object
| Name | Value |
| short | Serializes a set of input elements into a string of data. |
| params | (empty Array)
|
| desc | Serializes a set of input elements into a string of data. This will serialize all given elements. If you need serialization similar to the form submit of a browser, you should use the form plugin. This is also true for selects with multiple attribute set, only a single option is serialized. |
| tests |
Array
| Index | Value |
| 0 | var data = .not('button').serialize(); />// ignore button, IE takes text content as value, not relevant for this test ok( data == ;select2=3&select3=1',oobar&select1=&select2=3&select3=1',=&name=name&=foobar&select1=&select2=3&select3=1',p;amp;hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1',mp;amp;check=on&=on&hidden=&foo[bar]=&name=name&=foobar&;radio1=on&radio2=on&check=on&=on&hidest&text2=Test&radio1=o 'Check form serialization as query string' ); |
|
| type | String |
| name | serialize |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| after | e=John&location=Boston |
| desc | Serialize a selection of input elements to a string |
| before | <input type='text' name='name' value='John'/> <input type='text' name='location' value='Boston'/> |
| code | put[@type=text]").serialize(); |
|
|
| cat | AJAX |
|
| 256 |
Object
| Name | Value |
| short | Attach a function to be executed whenever an AJAX request begins. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute. |
| name | callback |
|
|
| desc | Attach a function to be executed whenever an AJAX request begins. |
| tests | (empty Array)
|
| type | jQuery |
| name | ajaxStart |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Show a loading message whenever an AJAX request starts. |
| code | ing").ajaxStart(function(){ /> $(this).show(); }); |
|
|
| cat | AJAX |
|
| 257 |
Object
| Name | Value |
| short | Attach a function to be executed whenever all AJAX requests have ended. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute. |
| name | callback |
|
|
| desc | Attach a function to be executed whenever all AJAX requests have ended. |
| tests | (empty Array)
|
| type | jQuery |
| name | ajaxStop |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Hide a loading message after all the AJAX requests have stopped. |
| code | ding").ajaxStop(function(){ /> $(this).hide(); }); |
|
|
| cat | AJAX |
|
| 258 |
Object
| Name | Value |
| short | Attach a function to be executed whenever an AJAX request completes. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute. |
| name | callback |
|
|
| desc | Attach a function to be executed whenever an AJAX request completes. |
| tests | (empty Array)
|
| type | jQuery |
| name | ajaxComplete |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Show a message when an AJAX request completes. |
| code | ").ajaxComplete(function(){ /> end("<li>Request lete.</li>"); />}); |
|
|
| cat | AJAX |
|
| 259 |
Object
| Name | Value |
| short | Attach a function to be executed whenever an AJAX request completes successfully. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute. |
| name | callback |
|
|
| desc | Attach a function to be executed whenever an AJAX request completes successfully. |
| tests | (empty Array)
|
| type | jQuery |
| name | ajaxSuccess |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Show a message when an AJAX request completes successfully. |
| code | g").ajaxSuccess(function(){ /> ("<li>Successful uest!</li>"); />}); |
|
|
| cat | AJAX |
|
| 260 |
Object
| Name | Value |
| short | Attach a function to be executed whenever an AJAX request fails. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Function |
| desc | The function to execute. |
| name | callback |
|
|
| desc | Attach a function to be executed whenever an AJAX request fails. |
| tests | (empty Array)
|
| type | jQuery |
| name | ajaxError |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Show a message when an AJAX request fails. |
| code | msg").ajaxError(function(){ /> ppend("<li>Error requesting page.</li>"); }); |
|
|
| cat | AJAX |
|
| 261 |
Object
| Name | Value |
| params | (empty Array)
|
| desc | |
| tests |
Array
| Index | Value |
| 0 | stop(); var counter = { complete: 0, success: 0, error: 0 }; var success = function() { counter.success++ }; var error = function() { counter.error++ }; var complete = function() { counter.complete++ };
Complete(complete).ajaxError(error).ajaxSuccess(success); plete).ajaxStop(complete).ajaxComplete(complete).ajaxEr />// start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = 0; counter.success = 0; counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }}); |
| 1 | stop(); var counter = { complete: 0, success: 0, error: 0 }; counter.error = 0; counter.success = 0; counter.complete = 0; var success = function() { counter.success++ }; var error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = 0; counter.success = 0; counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }}); |
|
| name | ajaxHandlersTesting |
| private | 1 |
| examples | (empty Array)
|
| short | |
|
| 262 |
Object
| Name | Value |
| short | Load a remote page using an HTTP GET request. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the page to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs that will be sent to the server. |
| name | params |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Load a remote page using an HTTP GET request. All of the arguments to the method (except URL) are optional. |
| tests | (empty Array)
|
| type | jQuery |
| name | $.get |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.get("test.cgi") |
|
| 1 |
Object
| Name | Value |
| code | $.get("test.cgi", { name: "John", time: "2pm" } ) |
|
| 2 |
Object
| Name | Value |
| code | $.get("test.cgi", function(data){ alert("Data Loaded: " + data); }) |
|
| 3 |
Object
| Name | Value |
| code | $.get("test.cgi", { name: "John", time: "2pm" }, function(data){ alert("Data Loaded: " + data); } ) |
|
|
| cat | AJAX |
|
| 263 |
Object
| Name | Value |
| short | Load a remote page using an HTTP GET request, only if it hasn't been modified since it was last retrieved. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the page to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs that will be sent to the server. |
| name | params |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Load a remote page using an HTTP GET request, only if it hasn't been modified since it was last retrieved. All of the arguments to the method (except URL) are optional. |
| tests |
Array
| Index | Value |
| 0 | stop(); function(msg) { ok( msg == 'ERROR', 'Check ifModified' ); start(); }); |
|
| type | jQuery |
| name | $.getIfModified |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.getIfModified("test.html") |
|
| 1 |
Object
| Name | Value |
| code | $.getIfModified("test.html", { name: "John", time: "2pm" } ) |
|
| 2 |
Object
| Name | Value |
| code | $.getIfModified("test.cgi", function(data){ alert("Data Loaded: " + data); }) |
|
| 3 |
Object
| Name | Value |
| code | $.getifModified("test.cgi", { name: "John", time: "2pm" }, function(data){ alert("Data Loaded: " + data); } ) |
|
|
| cat | AJAX |
|
| 264 |
Object
| Name | Value |
| short | Loads, and executes, a remote JavaScript file using an HTTP GET request. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the page to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Loads, and executes, a remote JavaScript file using an HTTP GET request. All of the arguments to the method (except URL) are optional. |
| tests |
Array
| Index | Value |
| 0 | stop(); $.getScript("data/test.js", function() { ok( foobar == "bar", 'Check if script was evaluated' ); start(); }); |
|
| type | jQuery |
| name | $.getScript |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.getScript("test.js") |
|
| 1 |
Object
| Name | Value |
| code | $.getScript("test.js", function(){ alert("Script loaded and executed."); }) |
|
|
| cat | AJAX |
|
| 265 |
Object
| Name | Value |
| short | Load a remote JSON object using an HTTP GET request. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the page to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs that will be sent to the server. |
| name | params |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Load a remote JSON object using an HTTP GET request. All of the arguments to the method (except URL) are optional. |
| tests |
Array
| Index | Value |
| 0 | stop(); $.getJSON("data/json.php", {json: "array"}, function(json) { ok( json[0].name == 'John', 'Check JSON: first, name' ); ok( json[0].age == 21, 'Check JSON: first, age' ); ok( json[1].name == 'Peter', 'Check JSON: second, name' ); ok( json[1].age == 25, 'Check JSON: second, age' ); start(); }); |
| 1 | stop(); $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); }); |
|
| type | jQuery |
| name | $.getJSON |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.getJSON("test.js", function(json){ alert("JSON Data: " + json.users[3].name); }) |
|
| 1 |
Object
| Name | Value |
| code | $.getJSON("test.js", { name: "John", time: "2pm" }, function(json){ alert("JSON Data: " + json.users[3].name); } ) |
|
|
| cat | AJAX |
|
| 266 |
Object
| Name | Value |
| short | Load a remote page using an HTTP POST request. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | String |
| desc | The URL of the page to load. |
| name | url |
|
| 1 |
Object
| Name | Value |
| type | Hash |
| desc | A set of key/value pairs that will be sent to the server. |
| name | params |
|
| 2 |
Object
| Name | Value |
| type | Function |
| desc | A function to be executed whenever the data is loaded. |
| name | callback |
|
|
| desc | Load a remote page using an HTTP POST request. All of the arguments to the method (except URL) are optional. |
| tests |
Array
| Index | Value |
| 0 | stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); }); |
|
| type | jQuery |
| name | $.post |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| code | $.post("test.cgi") |
|
| 1 |
Object
| Name | Value |
| code | $.post("test.cgi", { name: "John", time: "2pm" } ) |
|
| 2 |
Object
| Name | Value |
| code | $.post("test.cgi", function(data){ alert("Data Loaded: " + data); }) |
|
| 3 |
Object
| Name | Value |
| code | $.post("test.cgi", { name: "John", time: "2pm" }, function(data){ alert("Data Loaded: " + data); } ) |
|
|
| cat | AJAX |
|
| 267 |
Object
| Name | Value |
| short | Set the timeout of all AJAX requests to a specific amount of time. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Number |
| desc | How long before an AJAX request times out. |
| name | time |
|
|
| desc | Set the timeout of all AJAX requests to a specific amount of time. This will make all future AJAX requests timeout after a specified amount of time (the default is no timeout). |
| tests |
Array
| Index | Value |
| 0 | stop(); var passed = 0; var timeout; $.ajaxTimeout(1000); var pass = function() { passed++; if(passed == 2) { ok( true, 'Check local and global callbacks after timeout' ); clearTimeout(timeout); main').unbind("ajaxError"); /> start(); } }; var fail = function() { ok( false, 'Check for timeout failed' ); start(); }; timeout = setTimeout(fail, 1500);
/>$.ajax({ type: "GET", url: "data/name.php?wait=5", error: pass, success: fail }); |
| 1 | stop(); $.ajaxTimeout(50); $.ajax({ type: "GET", timeout: 5000, url: "data/name.php?wait=1", error: function() { ok( false, 'Check for local timeout failed' ); start(); }, success: function() { ok( true, 'Check for local timeout' ); start(); } }); // reset timeout $.ajaxTimeout(0); |
|
| type | jQuery |
| name | $.ajaxTimeout |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Make all AJAX requests timeout after 5 seconds. |
| code | $.ajaxTimeout( 5000 ); |
|
|
| cat | AJAX |
|
| 268 |
Object
| Name | Value |
| short | Load a remote page using an HTTP request. |
| params |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| type | Hash |
| desc | A set of properties to initialize the request with. |
| name | prop |
|
|
| desc | Load a remote page using an HTTP request. This function is the primary means of making AJAX requests using jQuery. $.ajax() takes one property, an object of key/value pairs, that're are used to initalize the request.
These are all the key/values that can be passed in to 'prop':
(String) type - The type of request to make (e.g. "POST" or "GET").
(String) url - The URL of the page to request.
(String) data - A string of data to be sent to the server (POST only).
(String) dataType - The type of data that you're expecting back from the server (e.g. "xml", "html", "script", or "json").
(Boolean) ifModified - Allow the request to be successful only if the response has changed since the last request, default is false, ignoring the Last-Modified header
(Number) timeout - Local timeout to override global timeout, eg. to give a single request a longer timeout while all others timeout after 1 seconds, see $.ajaxTimeout
(Boolean) global - Wheather to trigger global AJAX event handlers for this request, default is true. Set to true to prevent that global handlers like ajaxStart or ajaxStop are triggered.
(Function) error - A function to be called if the request fails. The function gets passed two arguments: The XMLHttpRequest object and a string describing the type of error that occurred.
(Function) success - A function to be called if the request succeeds. The function gets passed one argument: The data returned from the server, formatted according to the 'dataType' parameter.
(Function) complete - A function to be called when the request finishes. The function gets passed two arguments: The XMLHttpRequest object and a string describing the type the success of the request. |
| tests |
Array
| Index | Value |
| 0 | stop(); $.ajax({ type: "GET", url: "data/name.php?name=foo", success: function(msg){ ok( msg == 'bar', 'Check for GET' ); start(); } }); |
| 1 | stop(); $.ajax({ type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start(); } }); |
|
| type | jQuery |
| name | $.ajax |
| examples |
Array
| Index | Value |
| 0 |
Object
| Name | Value |
| desc | Load and execute a JavaScript file. |
| code | $.ajax({ type: "GET", url: "test.js", dataType: "script" }) |
|
| 1 |
Object
| Name | Value |
| desc | Save some data to the server and notify the user once its complete. |
| code | $.ajax({ type: "POST", url: "some.php", data: n&location=Boston", /> success: function(msg){ alert( "Data Saved: " + msg ); } }); |
|
|
| cat | AJAX |
|