[
{
'desc': 'The current SVN version of jQuery.',
'examples': [],
'name': 'jquery',
'params': [],
'private': 1,
'property': 1,
'short': 'The current SVN version of jQuery.',
'type': 'String'
},
{
'desc': 'The number of elements currently matched.',
'examples': [
{
'before': '<img src="test1.jpg"/> <img src="test2.jpg"/>',
'code': '$("img").length;',
'result': '2'
}
],
'name': 'length',
'params': [],
'property': 1,
'short': 'The number of elements currently matched.',
'type': 'Number'
},
{
'desc': 'The number of elements currently matched.',
'examples': [
{
'before': '<img src="test1.jpg"/> <img src="test2.jpg"/>',
'code': '$("img").size();',
'result': '2'
}
],
'name': 'size',
'params': [],
'short': 'The number of elements currently matched.',
'type': 'Number'
},
{
'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).',
'examples': [
{
'before': '<img src="test1.jpg"/> <img src="test2.jpg"/>',
'code': '$("img").get();',
'result': '[ <img src="test1.jpg"/> <img src="test2.jpg"/> ]'
}
],
'name': 'get',
'params': [],
'short': 'Access all matched elements.',
'type': 'Array<Element>'
},
{
'desc': 'Access a single matched element. num is used to access the numth element matched.',
'examples': [
{
'before': '<img src="test1.jpg"/> <img src="test2.jpg"/>',
'code': '$("img").get(1);',
'result': '[ <img src="test1.jpg"/> ]'
}
],
'name': 'get',
'params': [
{
'desc': 'Access the element in the <tt>num</tt>th position.',
'name': 'num',
'type': 'Number'
}
],
'short': 'Access a single matched element.',
'type': 'Element'
},
{
'desc': 'Set the jQuery object to an array of elements.',
'examples': [
{
'code': '$("img").get([ document.body ]);',
'result': '$("img").get() == [ document.body ]'
}
],
'name': 'get',
'params': [
{
'desc': 'An array of elements',
'name': 'elems',
'type': 'Elements'
}
],
'private': 1,
'short': 'Set the jQuery object to an array of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<img/> <img/>',
'code': '$("img").each(function(){ this.src = "test.jpg"; });',
'result': '<img src="test.jpg"/> <img src="test.jpg"/>'
}
],
'name': 'each',
'params': [
{
'desc': 'A function to execute',
'name': 'fn',
'type': 'Function'
}
],
'short': 'Execute a function within the context of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Access a property on the first matched element. This method makes it easy to retreive a property value from the first matched element.',
'examples': [
{
'before': '<img src="test.jpg"/>',
'code': '$("img").attr("src");',
'result': 'test.jpg'
}
],
'name': 'attr',
'params': [
{
'desc': 'The name of the property to access.',
'name': 'name',
'type': 'String'
}
],
'short': 'Access a property on the first matched element.',
'type': 'Object'
},
{
'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.',
'examples': [
{
'before': '<img/>',
'code': '$("img").attr({ src: "test.jpg", alt: "Test Image" });',
'result': '<img src="test.jpg" alt="Test Image"/>'
}
],
'name': 'attr',
'params': [
{
'desc': 'A set of key/value pairs to set as object properties.',
'name': 'prop',
'type': 'Hash'
}
],
'short': 'Set a hash of key/value object properties to all matched elements.',
'type': 'jQuery'
},
{
'desc': 'Set a single property to a value, on all matched elements.',
'examples': [
{
'before': '<img/>',
'code': '$("img").attr("src","test.jpg");',
'result': '<img src="test.jpg"/>'
}
],
'name': 'attr',
'params': [
{
'desc': 'The name of the property to set.',
'name': 'key',
'type': 'String'
},
{
'desc': 'The value to set the property to.',
'name': 'value',
'type': 'Object'
}
],
'short': 'Set a single property to a value, on all matched elements.',
'type': 'jQuery'
},
{
'desc': 'Access a style property on the first matched element. This method makes it easy to retreive a style property value from the first matched element.',
'examples': [
{
'before': '<p style="color:red;">Test Paragraph.</p>',
'code': '$("p").css("red");',
'result': 'red'
}
],
'name': 'css',
'params': [
{
'desc': 'The name of the property to access.',
'name': 'name',
'type': 'String'
}
],
'short': 'Access a style property on the first matched element.',
'type': 'Object'
},
{
'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.',
'examples': [
{
'before': '<p>Test Paragraph.</p>',
'code': '$("p").css({ color: "red", background: "blue" });',
'result': '<p style="color:red; background:blue;">Test Paragraph.</p>'
}
],
'name': 'css',
'params': [
{
'desc': 'A set of key/value pairs to set as style properties.',
'name': 'prop',
'type': 'Hash'
}
],
'short': 'Set a hash of key/value style properties to all matched elements.',
'type': 'jQuery'
},
{
'desc': 'Set a single style property to a value, on all matched elements.',
'examples': [
{
'before': '<p>Test Paragraph.</p>',
'code': '$("p").css("color","red");',
'result': '<p style="color:red;">Test Paragraph.</p>'
}
],
'name': 'css',
'params': [
{
'desc': 'The name of the property to set.',
'name': 'key',
'type': 'String'
},
{
'desc': 'The value to set the property to.',
'name': 'value',
'type': 'Object'
}
],
'short': 'Set a single style property to a value, on all matched elements.',
'type': 'jQuery'
},
{
'desc': 'Retreive 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.',
'examples': [
{
'before': '<p>Test Paragraph.</p>',
'code': '$("p").text();',
'result': 'Test Paragraph.'
}
],
'name': 'text',
'params': [],
'short': 'Retreive the text contents of all matched elements.',
'type': 'String'
},
{
'any': [
'String html A string of HTML, that will be created on the fly and wrapped around the target.',
'Element elem A DOM element that will be wrapped.',
'Array<Element> elems An array of elements, the first of which will be wrapped.',
'Object obj Any object, converted to a string, then a text node.'
],
'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.
The way that is works is that it goes through the first element argument provided and finds the deepest element within the structure - it is that element that will en-wrap everything else.',
'examples': [
{
'before': '<p>Test Paragraph.</p>',
'code': '$("p").wrap("<div class=\'wrap\'></div>");',
'result': '<div class=\'wrap\'><p>Test Paragraph.</p></div>'
}
],
'name': 'wrap',
'params': [],
'short': 'Wrap all matched elements with a structure of other elements.',
'type': 'jQuery'
},
{
'any': [
'String html A string of HTML, that will be created on the fly and appended to the target.',
'Element elem A DOM element that will be appended.',
'Array<Element> elems An array of elements, all of which will be appended.',
'Object obj Any object, converted to a string, then a text node.'
],
'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.',
'examples': [
{
'before': '<p>I would like to say: </p>',
'code': '$("p").append("<b>Hello</b>");',
'result': '<p>I would like to say: <b>Hello</b></p>'
}
],
'name': 'append',
'params': [],
'short': 'Append any number of elements to the inside of all matched elements.',
'type': 'jQuery'
},
{
'any': [
'String html A string of HTML, that will be created on the fly and prepended to the target.',
'Element elem A DOM element that will be prepended.',
'Array<Element> elems An array of elements, all of which will be prepended.',
'Object obj Any object, converted to a string, then a text node.'
],
'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.',
'examples': [
{
'before': '<p>, how are you?</p>',
'code': '$("p").prepend("<b>Hello</b>");',
'result': '<p><b>Hello</b>, how are you?</p>'
}
],
'name': 'prepend',
'params': [],
'short': 'Prepend any number of elements to the inside of all matched elements.',
'type': 'jQuery'
},
{
'any': [
'String html A string of HTML, that will be created on the fly and inserted.',
'Element elem A DOM element that will beinserted.',
'Array<Element> elems An array of elements, all of which will be inserted.',
'Object obj Any object, converted to a string, then a text node.'
],
'desc': 'Insert any number of elements before each of the matched elements.',
'examples': [
{
'before': '<p>how are you?</p>',
'code': '$("p").before("<b>Hello</b>");',
'result': '<b>Hello</b><p>how are you?</p>'
}
],
'name': 'before',
'params': [],
'short': 'Insert any number of elements before each of the matched elements.',
'type': 'jQuery'
},
{
'any': [
'String html A string of HTML, that will be created on the fly and inserted.',
'Element elem A DOM element that will beinserted.',
'Array<Element> elems An array of elements, all of which will be inserted.',
'Object obj Any object, converted to a string, then a text node.'
],
'desc': 'Insert any number of elements after each of the matched elements.',
'examples': [
{
'before': '<p>How are you?</p>',
'code': '$("p").after("<p>I\'m doing fine.</p>");',
'result': '<p>How are you?</p><p>I\'m doing fine.</p>'
}
],
'name': 'after',
'params': [],
'short': 'Insert any number of elements after each of the matched elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p><span>Hello</span>, how are you?</p>',
'code': '$("p").find("span").end();',
'result': '$("p").find("span").end() == [ <p>...</p> ]'
}
],
'name': 'end',
'params': [],
'short': 'End the most recent \'destructive\' operation, reverting the list of matched elements back to its previous state.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p><span>Hello</span>, how are you?</p>',
'code': '$("p").find("span");',
'result': '$("p").find("span") == [ <span>Hello</span> ]'
}
],
'name': 'find',
'params': [
{
'desc': 'An expression to search with.',
'name': 'expr',
'type': 'String'
}
],
'short': 'Searches for all elements that match the specified expression.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p class="selected">Hello</p><p>How are you?</p>',
'code': '$("p").filter(".selected")',
'result': '$("p").filter(".selected") == [ <p class="selected">Hello</p> ]'
}
],
'name': 'filter',
'params': [
{
'desc': 'An expression to search with.',
'name': 'expr',
'type': 'String'
}
],
'short': 'Removes all elements from the set of matched elements that do not match the specified expression.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><p>Hello Again</p><p class="selected">And Again</p>',
'code': '$("p").filter([".selected", ":first"])',
'result': '$("p").filter([".selected", ":first"]) == [ <p>Hello</p>, <p class="selected">And Again</p> ]'
}
],
'name': 'filter',
'params': [
{
'desc': 'A set of expressions to evaluate against',
'name': 'exprs',
'type': 'Array<String>'
}
],
'short': 'Removes all elements from the set of matched elements that do not match at least one of the expressions passed to the function.',
'type': 'jQuery'
},
{
'desc': 'Removes the specified Element from the set of matched elements. This method is used to remove a single Element from a jQuery object.',
'examples': [
{
'before': '<p>Hello</p><p id="selected">Hello Again</p>',
'code': '$("p").not( document.getElementById("selected") )',
'result': '[ <p>Hello</p> ]'
}
],
'name': 'not',
'params': [
{
'desc': 'An element to remove from the set',
'name': 'el',
'type': 'Element'
}
],
'short': 'Removes the specified Element from the set of matched elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><p id="selected">Hello Again</p>',
'code': '$("p").not("#selected")',
'result': '[ <p>Hello</p> ]'
}
],
'name': 'not',
'params': [
{
'desc': 'An expression with which to remove matching elements',
'name': 'expr',
'type': 'String'
}
],
'short': 'Removes elements matching the specified expression from the set of matched elements.',
'type': 'jQuery'
},
{
'desc': 'Adds the elements matched by the expression to the jQuery object. This can be used to concatenate the result sets of two expressions.',
'examples': [
{
'before': '<p>Hello</p><p><span>Hello Again</span></p>',
'code': '$("p").add("span")',
'result': '[ <p>Hello</p>, <span>Hello Again</span> ]'
}
],
'name': 'add',
'params': [
{
'desc': 'An expression whose matched elements are added',
'name': 'expr',
'type': 'String'
}
],
'short': 'Adds the elements matched by the expression to the jQuery object.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><p><span id="a">Hello Again</span><span id="b">And Again</span></p>',
'code': '$("p").add([document.getElementById("a"), document.getElementById("b")])',
'result': '[ <p>Hello</p>, <span id="a">Hello Again</span>, <span id="b">And Again</span> ]'
}
],
'name': 'add',
'params': [
{
'desc': 'An array of Elements to add',
'name': 'els',
'type': 'Array<Element>'
}
],
'short': 'Adds each of the Elements in the array to the set of matched elements.',
'type': 'jQuery'
},
{
'desc': 'Adds a single Element to the set of matched elements. This is used to add a single Element to a jQuery object.',
'examples': [
{
'before': '<p>Hello</p><p><span id="a">Hello Again</span></p>',
'code': '$("p").add( document.getElementById("a") )',
'result': '[ <p>Hello</p>, <span id="a">Hello Again</span> ]'
}
],
'name': 'add',
'params': [
{
'desc': 'An Element to add',
'name': 'el',
'type': 'Element'
}
],
'short': 'Adds a single Element to the set of matched elements.',
'type': 'jQuery'
},
{
'desc': '',
'examples': [],
'name': 'domManip',
'params': [
{
'desc': '',
'name': 'args',
'type': 'Array'
},
{
'desc': '',
'name': 'table',
'type': 'Boolean'
},
{
'desc': '',
'name': 'int',
'type': 'Number'
},
{
'desc': 'The function doing the DOM manipulation.',
'name': 'fn',
'type': 'Function'
}
],
'private': 1,
'short': '',
'type': 'jQuery'
},
{
'desc': '',
'examples': [],
'name': 'pushStack',
'params': [
{
'desc': '',
'name': 'a',
'type': 'Array'
},
{
'desc': '',
'name': 'args',
'type': 'Array'
}
],
'private': 1,
'short': '',
'type': 'jQuery'
},
{
'desc': '',
'examples': [],
'name': 'extend',
'params': [
{
'desc': '',
'name': 'obj',
'type': 'Object'
},
{
'desc': '',
'name': 'prop',
'type': 'Object'
}
],
'private': 1,
'short': '',
'type': 'Object'
},
{
'desc': 'Extend one object with another, returning the original, modified, object. This is a great utility for simple inheritance.',
'examples': [],
'name': '$.extend',
'params': [
{
'desc': 'The object to extend',
'name': 'obj',
'type': 'Object'
},
{
'desc': 'The object that will be merged into the first.',
'name': 'prop',
'type': 'Object'
}
],
'short': 'Extend one object with another, returning the original, modified, object.',
'type': 'Object'
},
{
'desc': '',
'examples': [],
'name': 'init',
'params': [],
'private': 1,
'short': '',
'type': 'undefined'
},
{
'desc': 'A generic iterator function, which can be used to seemlessly iterate over both objects and arrays.',
'examples': [],
'name': '$.each',
'params': [
{
'desc': 'The object, or array, to iterate over.',
'name': 'obj',
'type': 'Object'
},
{
'desc': 'The function that will be executed on every object.',
'name': 'fn',
'type': 'Object'
}
],
'short': 'A generic iterator function, which can be used to seemlessly iterate over both objects and arrays.',
'type': 'Object'
},
{
'desc': 'Remove the whitespace from the beginning and end of a string.',
'examples': [],
'name': '$.trim',
'params': [
{
'desc': 'The string to trim.',
'name': 'str',
'type': 'String'
}
],
'private': 1,
'short': 'Remove the whitespace from the beginning and end of a string.',
'type': 'String'
},
{
'desc': 'All ancestors of a given element.',
'examples': [],
'name': '$.parents',
'params': [
{
'desc': 'The element to find the ancestors of.',
'name': 'elem',
'type': 'Element'
}
],
'private': 1,
'short': 'All ancestors of a given element.',
'type': 'Array<Element>'
},
{
'desc': 'All elements on a specified axis.',
'examples': [],
'name': '$.sibling',
'params': [
{
'desc': 'The element to find all the siblings of (including itself).',
'name': 'elem',
'type': 'Element'
}
],
'private': 1,
'short': 'All elements on a specified axis.',
'type': 'Array'
},
{
'desc': 'Merge two arrays together, removing all duplicates.',
'examples': [],
'name': '$.merge',
'params': [
{
'desc': 'The first array to merge.',
'name': 'a',
'type': 'Array'
},
{
'desc': 'The second array to merge.',
'name': 'b',
'type': 'Array'
}
],
'private': 1,
'short': 'Merge two arrays together, removing all duplicates.',
'type': 'Array'
},
{
'desc': 'Remove items that aren\'t matched in an array. The function passed in to this method will be passed two arguments: \'a\' (which is the array item) and \'i\' (which is the index of the item in the array).',
'examples': [],
'name': '$.grep',
'params': [
{
'desc': 'The Array to find items in.',
'name': 'array',
'type': 'Array'
},
{
'desc': 'The function to process each item against.',
'name': 'fn',
'type': 'Function'
},
{
'desc': 'Invert the selection - select the opposite of the function.',
'name': 'inv',
'type': 'Boolean'
}
],
'private': 1,
'short': 'Remove items that aren\'t matched in an array.',
'type': 'Array'
},
{
'desc': 'Translate all items in array to another array of items. The translation function that is provided to this method is passed one argument: \'a\' (the item to be translated). If an array is returned, that array is mapped out and merged into the full array. Additionally, returning \'null\' or \'undefined\' will delete the item from the array. Both of these changes imply that the size of the array may not be the same size upon completion, as it was when it started.',
'examples': [],
'name': '$.map',
'params': [
{
'desc': 'The Array to translate.',
'name': 'array',
'type': 'Array'
},
{
'desc': 'The function to process each item against.',
'name': 'fn',
'type': 'Function'
}
],
'private': 1,
'short': 'Translate all items in array to another array of items.',
'type': 'Array'
},
{
'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.',
'examples': [
{
'before': '<p>I would like to say: </p><div id="foo"></div>',
'code': '$("p").appendTo("#foo");',
'result': '<div id="foo"><p>I would like to say: </p></div>'
}
],
'name': 'appendTo',
'params': [
{
'desc': 'A jQuery expression of elements to match.',
'name': 'expr',
'type': 'String'
}
],
'short': 'Append all of the matched elements to another, specified, set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>I would like to say: </p><div id="foo"><b>Hello</b></div>',
'code': '$("p").prependTo("#foo");',
'result': '<div id="foo"><p>I would like to say: </p><b>Hello</b></div>'
}
],
'name': 'prependTo',
'params': [
{
'desc': 'A jQuery expression of elements to match.',
'name': 'expr',
'type': 'String'
}
],
'short': 'Prepend all of the matched elements to another, specified, set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<div id="foo">Hello</div><p>I would like to say: </p>',
'code': '$("p").insertBefore("#foo");',
'result': '<p>I would like to say: </p><div id="foo">Hello</div>'
}
],
'name': 'insertBefore',
'params': [
{
'desc': 'A jQuery expression of elements to match.',
'name': 'expr',
'type': 'String'
}
],
'short': 'Insert all of the matched elements before another, specified, set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>I would like to say: </p><div id="foo">Hello</div>',
'code': '$("p").insertAfter("#foo");',
'result': '<div id="foo">Hello</div><p>I would like to say: </p>'
}
],
'name': 'insertAfter',
'params': [
{
'desc': 'A jQuery expression of elements to match.',
'name': 'expr',
'type': 'String'
}
],
'short': 'Insert all of the matched elements after another, specified, set of elements.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS width of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").width();',
'result': '"300px"'
}
],
'name': 'width',
'params': [],
'short': 'Get the current CSS width of the first matched element.',
'type': 'String'
},
{
'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.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").width("20px");',
'result': '<p style="width:20px;">This is just a test.</p>'
}
],
'name': 'width',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS width of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS height of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").height();',
'result': '"14px"'
}
],
'name': 'height',
'params': [],
'short': 'Get the current CSS height of the first matched element.',
'type': 'String'
},
{
'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.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").height("20px");',
'result': '<p style="height:20px;">This is just a test.</p>'
}
],
'name': 'height',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS height of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS top of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").top();',
'result': '"0px"'
}
],
'name': 'top',
'params': [],
'short': 'Get the current CSS top of the first matched element.',
'type': 'String'
},
{
'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.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").top("20px");',
'result': '<p style="top:20px;">This is just a test.</p>'
}
],
'name': 'top',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS top of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS left of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").left();',
'result': '"0px"'
}
],
'name': 'left',
'params': [],
'short': 'Get the current CSS left of the first matched element.',
'type': 'String'
},
{
'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.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").left("20px");',
'result': '<p style="left:20px;">This is just a test.</p>'
}
],
'name': 'left',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS left of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS position of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").position();',
'result': '"static"'
}
],
'name': 'position',
'params': [],
'short': 'Get the current CSS position of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the CSS position of every matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").position("relative");',
'result': '<p style="position:relative;">This is just a test.</p>'
}
],
'name': 'position',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS position of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS float of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").float();',
'result': '"none"'
}
],
'name': 'float',
'params': [],
'short': 'Get the current CSS float of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the CSS float of every matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").float("left");',
'result': '<p style="float:left;">This is just a test.</p>'
}
],
'name': 'float',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS float of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS overflow of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").overflow();',
'result': '"none"'
}
],
'name': 'overflow',
'params': [],
'short': 'Get the current CSS overflow of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the CSS overflow of every matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").overflow("auto");',
'result': '<p style="overflow:auto;">This is just a test.</p>'
}
],
'name': 'overflow',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS overflow of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS color of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").color();',
'result': '"black"'
}
],
'name': 'color',
'params': [],
'short': 'Get the current CSS color of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the CSS color of every matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").color("blue");',
'result': '<p style="color:blue;">This is just a test.</p>'
}
],
'name': 'color',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS color of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current CSS background of the first matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").background();',
'result': '""'
}
],
'name': 'background',
'params': [],
'short': 'Get the current CSS background of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the CSS background of every matched element.',
'examples': [
{
'before': '<p>This is just a test.</p>',
'code': '$("p").background("blue");',
'result': '<p style="background:blue;">This is just a test.</p>'
}
],
'name': 'background',
'params': [
{
'desc': 'Set the CSS property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the CSS background of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current value of the first matched element.',
'examples': [
{
'before': '<input type="text" value="some text"/>',
'code': '$("input").val();',
'result': '"some text"'
}
],
'name': 'val',
'params': [],
'short': 'Get the current value of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the value of every matched element.',
'examples': [
{
'before': '<input type="text" value="some text"/>',
'code': '$("input").value("test");',
'result': '<input type="text" value="test"/>'
}
],
'name': 'val',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the value of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the html contents of the first matched element.',
'examples': [
{
'before': '<div><input/></div>',
'code': '$("div").html();',
'result': '<input/>'
}
],
'name': 'html',
'params': [],
'short': 'Get the html contents of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the html contents of every matched element.',
'examples': [
{
'before': '<div><input/></div>',
'code': '$("div").html("<b>new stuff</b>");',
'result': '<div><b>new stuff</b</div>'
}
],
'name': 'html',
'params': [
{
'desc': 'Set the html contents to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the html contents of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current id of the first matched element.',
'examples': [
{
'before': '<input type="text" id="test" value="some text"/>',
'code': '$("input").id();',
'result': '"test"'
}
],
'name': 'id',
'params': [],
'short': 'Get the current id of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the id of every matched element.',
'examples': [
{
'before': '<input type="text" id="test" value="some text"/>',
'code': '$("input").id("newid");',
'result': '<input type="text" id="newid" value="some text"/>'
}
],
'name': 'id',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the id of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current title of the first matched element.',
'examples': [
{
'before': '<img src="test.jpg" title="my image"/>',
'code': '$("img").title();',
'result': '"my image"'
}
],
'name': 'title',
'params': [],
'short': 'Get the current title of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the title of every matched element.',
'examples': [
{
'before': '<img src="test.jpg" title="my image"/>',
'code': '$("img").title("new title");',
'result': '<img src="test.jpg" title="new image"/>'
}
],
'name': 'title',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the title of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current name of the first matched element.',
'examples': [
{
'before': '<input type="text" name="username"/>',
'code': '$("input").name();',
'result': '"username"'
}
],
'name': 'name',
'params': [],
'short': 'Get the current name of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the name of every matched element.',
'examples': [
{
'before': '<input type="text" name="username"/>',
'code': '$("input").name("user");',
'result': '<input type="text" name="user"/>'
}
],
'name': 'name',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the name of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current href of the first matched element.',
'examples': [
{
'before': '<a href="test.html">my link</a>',
'code': '$("a").href();',
'result': '"test.html"'
}
],
'name': 'href',
'params': [],
'short': 'Get the current href of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the href of every matched element.',
'examples': [
{
'before': '<a href="test.html">my link</a>',
'code': '$("a").href("test2.html");',
'result': '<a href="test2.html">my link</a>'
}
],
'name': 'href',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the href of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current src of the first matched element.',
'examples': [
{
'before': '<img src="test.jpg" title="my image"/>',
'code': '$("img").src();',
'result': '"test.jpg"'
}
],
'name': 'src',
'params': [],
'short': 'Get the current src of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the src of every matched element.',
'examples': [
{
'before': '<img src="test.jpg" title="my image"/>',
'code': '$("img").src("test2.jpg");',
'result': '<img src="test2.jpg" title="my image"/>'
}
],
'name': 'src',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the src of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get the current rel of the first matched element.',
'examples': [
{
'before': '<a href="test.html" rel="nofollow">my link</a>',
'code': '$("a").rel();',
'result': '"nofollow"'
}
],
'name': 'rel',
'params': [],
'short': 'Get the current rel of the first matched element.',
'type': 'String'
},
{
'desc': 'Set the rel of every matched element.',
'examples': [
{
'before': '<a href="test.html">my link</a>',
'code': '$("a").rel("nofollow");',
'result': '<a href="test.html" rel="nofollow">my link</a>'
}
],
'name': 'rel',
'params': [
{
'desc': 'Set the property to the specified value.',
'name': 'val',
'type': 'String'
}
],
'short': 'Set the rel of every matched element.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing the unique parents of the matched set of elements.',
'examples': [
{
'before': '<div><p>Hello</p><p>Hello</p></div>',
'code': '$("p").parent()',
'result': '[ <div><p>Hello</p><p>Hello</p></div> ]'
}
],
'name': 'parent',
'params': [],
'short': 'Get a set of elements containing the unique parents of the matched set of elements.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing the unique parents of the matched set of elements, and filtered by an expression.',
'examples': [
{
'before': '<div><p>Hello</p></div><div class="selected"><p>Hello Again</p></div>',
'code': '$("p").parent(".selected")',
'result': '[ <div class="selected"><p>Hello Again</p></div> ]'
}
],
'name': 'parent',
'params': [
{
'desc': 'An expression to filter the parents with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing the unique parents of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing the unique ancestors of the matched set of elements.',
'examples': [
{
'before': '<html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>',
'code': '$("span").ancestors()',
'result': '[ <body>...</body>, <div>...</div>, <p><span>Hello</span></p> ]'
}
],
'name': 'ancestors',
'params': [],
'short': 'Get a set of elements containing the unique ancestors of the matched set of elements.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression.',
'examples': [
{
'before': '<html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>',
'code': '$("span").ancestors("p")',
'result': '[ <p><span>Hello</span></p> ]'
}
],
'name': 'ancestors',
'params': [
{
'desc': 'An expression to filter the ancestors with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing the unique ancestors of the matched set of elements.',
'examples': [
{
'before': '<html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>',
'code': '$("span").ancestors()',
'result': '[ <body>...</body>, <div>...</div>, <p><span>Hello</span></p> ]'
}
],
'name': 'parents',
'params': [],
'short': 'Get a set of elements containing the unique ancestors of the matched set of elements.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression.',
'examples': [
{
'before': '<html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>',
'code': '$("span").ancestors("p")',
'result': '[ <p><span>Hello</span></p> ]'
}
],
'name': 'parents',
'params': [
{
'desc': 'An expression to filter the ancestors with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><p>Hello Again</p><div><span>And Again</span></div>',
'code': '$("p").next()',
'result': '[ <p>Hello Again</p>, <div><span>And Again</span></div> ]'
}
],
'name': 'next',
'params': [],
'short': 'Get a set of elements containing the unique next siblings of each of the matched set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><p class="selected">Hello Again</p><div><span>And Again</span></div>',
'code': '$("p").next(".selected")',
'result': '[ <p class="selected">Hello Again</p> ]'
}
],
'name': 'next',
'params': [
{
'desc': 'An expression to filter the next Elements with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing the unique next siblings of each of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><div><span>Hello Again</span></div><p>And Again</p>',
'code': '$("p").previous()',
'result': '[ <div><span>Hello Again</span></div> ]'
}
],
'name': 'prev',
'params': [],
'short': 'Get a set of elements containing the unique previous siblings of each of the matched set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<div><span>Hello</span></div><p class="selected">Hello Again</p><p>And Again</p>',
'code': '$("p").previous(".selected")',
'result': '[ <div><span>Hello</span></div> ]'
}
],
'name': 'prev',
'params': [
{
'desc': 'An expression to filter the previous Elements with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing the unique previous siblings of each of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing all of the unique siblings of each of the matched set of elements.',
'examples': [
{
'before': '<p>Hello</p><div><span>Hello Again</span></div><p>And Again</p>',
'code': '$("div").siblings()',
'result': '[ <p>Hello</p>, <p>And Again</p> ]'
}
],
'name': 'siblings',
'params': [],
'short': 'Get a set of elements containing all of the unique siblings of each of the matched set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<div><span>Hello</span></div><p class="selected">Hello Again</p><p>And Again</p>',
'code': '$("div").siblings(".selected")',
'result': '[ <p class="selected">Hello Again</p> ]'
}
],
'name': 'siblings',
'params': [
{
'desc': 'An expression to filter the sibling Elements with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing all of the unique siblings of each of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'desc': 'Get a set of elements containing all of the unique children of each of the matched set of elements.',
'examples': [
{
'before': '<p>Hello</p><div><span>Hello Again</span></div><p>And Again</p>',
'code': '$("div").children()',
'result': '[ <span>Hello Again</span> ]'
}
],
'name': 'children',
'params': [],
'short': 'Get a set of elements containing all of the unique children of each of the matched set of elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<div><span>Hello</span><p class="selected">Hello Again</p><p>And Again</p></div>',
'code': '$("div").children(".selected")',
'result': '[ <p class="selected">Hello Again</p> ]'
}
],
'name': 'children',
'params': [
{
'desc': 'An expression to filter the child Elements with',
'name': 'expr',
'type': 'String'
}
],
'short': 'Get a set of elements containing all of the unique siblings of each of the matched set of elements, and filtered by an expression.',
'type': 'jQuery'
},
{
'desc': 'Displays each of the set of matched elements if they are hidden.',
'examples': [
{
'before': '<p style="display: none">Hello</p>',
'code': '$("p").show()',
'result': '[ <p style="display: block">Hello</p> ]'
}
],
'name': 'show',
'params': [],
'short': 'Displays each of the set of matched elements if they are hidden.',
'type': 'jQuery'
},
{
'desc': 'Hides each of the set of matched elements if they are shown.',
'examples': [
{
'before': '<p>Hello</p>',
'code': '$("p").hide()',
'result': '[ <p style="display: none">Hello</p> ]'
}
],
'name': 'hide',
'params': [],
'short': 'Hides each of the set of matched elements if they are shown.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p>Hello</p><p style="display: none">Hello Again</p>',
'code': '$("p").toggle()',
'result': '[ <p style="display: none">Hello</p>, <p style="display: block">Hello Again</p> ]'
}
],
'name': 'toggle',
'params': [],
'short': 'Toggles each of the set of matched elements.',
'type': 'jQuery'
},
{
'desc': 'Adds the specified class to each of the set of matched elements.',
'examples': [
{
'before': '<p>Hello</p>',
'code': '("p").addClass("selected")',
'result': '[ <p class="selected">Hello</p> ]'
}
],
'name': 'addClass',
'params': [
{
'desc': 'A CSS class to add to the elements',
'name': 'class',
'type': 'String'
}
],
'short': 'Adds the specified class to each of the set of matched elements.',
'type': 'jQuery'
},
{
'desc': 'The opposite of addClass. Removes the specified class from the set of matched elements.',
'examples': [
{
'before': '<p class="selected">Hello</p>',
'code': '("p").removeClass("selected")',
'result': '[ <p>Hello</p> ]'
}
],
'name': 'removeClass',
'params': [
{
'desc': 'A CSS class to remove from the elements',
'name': 'class',
'type': 'String'
}
],
'short': 'The opposite of addClass.',
'type': 'jQuery'
},
{
'desc': 'Adds the specified class if it is present. Remove it if it is not present.',
'examples': [
{
'before': '<p>Hello</p><p class="selected">Hello Again</p>',
'code': '("p").toggleClass("selected")',
'result': '[ <p class="selected">Hello</p>, <p>Hello Again</p> ]'
}
],
'name': 'toggleClass',
'params': [
{
'desc': 'A CSS class with which to toggle the elements',
'name': 'class',
'type': 'String'
}
],
'short': 'Adds the specified class if it is present.',
'type': 'jQuery'
},
{
'desc': 'Removes all child nodes from the set of matched elements.',
'examples': [
{
'before': '<p>Hello, <span>Person</span> <a href="#">and person</a></p>',
'code': '("p").empty()',
'result': '[ <p></p> ]'
}
],
'name': 'empty',
'params': [],
'short': 'Removes all child nodes from the set of matched elements.',
'type': 'jQuery'
},
{
'desc': 'Binds a particular event (like click) to a each of a set of match elements.',
'examples': [
{
'before': '<p>Hello</p>',
'code': '$("p").bind( "click", function() { alert("Hello"); } )',
'result': '[ <p>Hello</p> ] Cancel a default action and prevent it from bubbling by returning false
from your function.'
},
{
'code': '$("form").bind( "submit", function() { return false; } ) Cancel a default action by using the preventDefault method.'
},
{
'code': '$("form").bind( "submit", function() { e.preventDefault(); } ) Stop an event from bubbling by using the stopPropogation method.'
},
{
'code': '$("form").bind( "submit", function() { e.stopPropogation(); } )'
}
],
'name': 'bind',
'params': [
{
'desc': 'An event type',
'name': 'type',
'type': 'String'
},
{
'desc': 'A function to bind to the event on each of the set of matched elements',
'name': 'fn',
'type': 'Function'
}
],
'short': 'Binds a particular event (like click) to a each of a set of match elements.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'before': '<p onclick="alert(\'Hello\');">Hello</p>',
'code': '$("p").unbind( "click", function() { alert("Hello"); } )',
'result': '[ <p>Hello</p> ]'
}
],
'name': 'unbind',
'params': [
{
'desc': 'An event type',
'name': 'type',
'type': 'String'
},
{
'desc': 'A function to unbind from the event on each of the set of matched elements',
'name': 'fn',
'type': 'Function'
}
],
'short': 'The opposite of bind, removes a bound event from each of the matched elements.',
'type': 'jQuery'
},
{
'desc': 'Removes all bound events of a particular type from each of the matched elements.',
'examples': [
{
'before': '<p onclick="alert(\'Hello\');">Hello</p>',
'code': '$("p").unbind( "click" )',
'result': '[ <p>Hello</p> ]'
}
],
'name': 'unbind',
'params': [
{
'desc': 'An event type',
'name': 'type',
'type': 'String'
}
],
'short': 'Removes all bound events of a particular type from each of the matched elements.',
'type': 'jQuery'
},
{
'desc': 'Removes all bound events from each of the matched elements.',
'examples': [
{
'before': '<p onclick="alert(\'Hello\');">Hello</p>',
'code': '$("p").unbind()',
'result': '[ <p>Hello</p> ]'
}
],
'name': 'unbind',
'params': [],
'short': 'Removes all bound events from each of the matched elements.',
'type': 'jQuery'
},
{
'desc': 'Trigger a type of event on every matched element.',
'examples': [
{
'before': '<p click="alert(\'hello\')">Hello</p>',
'code': '$("p").trigger("click")',
'result': 'alert(\'hello\')'
}
],
'name': 'trigger',
'params': [
{
'desc': 'An event type to trigger.',
'name': 'type',
'type': 'String'
}
],
'short': 'Trigger a type of event on every matched element.',
'type': 'jQuery'
},
{
'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.',
'examples': [
{
'code': '$("p").toggle(function(){ $(this).addClass("selected");
},function(){ $(this).removeClass("selected");
});'
}
],
'name': 'toggle',
'params': [
{
'desc': 'The function to execute on every even click.',
'name': 'even',
'type': 'Function'
},
{
'desc': 'The function to execute on every odd click.',
'name': 'odd',
'type': 'Function'
}
],
'short': 'Toggle between two function calls every other click.',
'type': 'jQuery'
},
{
'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).',
'examples': [
{
'code': '$("p").hover(function(){ $(this).addClass("over");
},function(){ $(this).addClass("out");
});'
}
],
'name': 'hover',
'params': [
{
'desc': 'The function to fire whenever the mouse is moved over a matched element.',
'name': 'over',
'type': 'Function'
},
{
'desc': 'The function to fire whenever the mouse is moved off of a matched element.',
'name': 'out',
'type': 'Function'
}
],
'short': 'A method for simulating hovering (moving the mouse on, and off, an object).',
'type': 'jQuery'
},
{
'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