The current SVN version of jQuery. The number of elements currently matched. $("img").length; 2 <img src="test1.jpg"/> <img src="test2.jpg"/> The number of elements currently matched. $("img").size(); 2 <img src="test1.jpg"/> <img src="test2.jpg"/> 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). $("img").get(); [ <img src="test1.jpg"/> <img src="test2.jpg"/> ] <img src="test1.jpg"/> <img src="test2.jpg"/> Access the element in the Nth position. Access a single matched element. num is used to access the Nth element matched. $("img").get(1); [ <img src="test1.jpg"/> ] <img src="test1.jpg"/> <img src="test2.jpg"/> An array of elements Set the jQuery object to an array of elements. $("img").get([ document.body ]); $("img").get() == [ document.body ] A function to execute 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. $("img").each(function(){ this.src = "test.jpg"; }); <img src="test.jpg"/> <img src="test.jpg"/> <img/> <img/> The name of the property to access. Access a property on the first matched element. This method makes it easy to retreive a property value from the first matched element. $("img").attr("src"); test.jpg <img src="test.jpg"/> A set of key/value pairs to set as object properties. 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. $("img").attr({ src: "test.jpg", alt: "Test Image" }); <img src="test.jpg" alt="Test Image"/> <img/> The name of the property to set. The value to set the property to. Set a single property to a value, on all matched elements. $("img").attr("src","test.jpg"); <img src="test.jpg"/> <img/> The name of the property to access. 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. $("p").css("red"); red <p style="color:red;">Test Paragraph.</p> A set of key/value pairs to set as style properties. 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. $("p").css({ color: "red", background: "blue" }); <p style="color:red; background:blue;">Test Paragraph.</p> <p>Test Paragraph.</p> The name of the property to set. The value to set the property to. Set a single style property to a value, on all matched elements. $("p").css("color","red"); <p style="color:red;">Test Paragraph.</p> <p>Test Paragraph.</p> 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. $("p").text(); Test Paragraph. <p>Test Paragraph.</p> A string of HTML, that will be created on the fly and wrapped around the target. A DOM element that will be wrapped. An array of elements, the first of which will be wrapped. Any object, converted to a string, then a text node. 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. $("p").wrap("<div class='wrap'></div>"); <div class='wrap'><p>Test Paragraph.</p></div> <p>Test Paragraph.</p> A string of HTML, that will be created on the fly and appended to the target. A DOM element that will be appended. An array of elements, all of which will be appended. Any object, converted to a string, then a text node. 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. $("p").append("<b>Hello</b>"); <p>I would like to say: <b>Hello</b></p> <p>I would like to say: </p> A string of HTML, that will be created on the fly and prepended to the target. A DOM element that will be prepended. An array of elements, all of which will be prepended. Any object, converted to a string, then a text node. 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. $("p").prepend("<b>Hello</b>"); <p><b>Hello</b>, how are you?</p> <p>, how are you?</p> A string of HTML, that will be created on the fly and inserted. A DOM element that will beinserted. An array of elements, all of which will be inserted. Any object, converted to a string, then a text node. Insert any number of elements before each of the matched elements. $("p").before("<b>Hello</b>"); <b>Hello</b><p>how are you?</p> <p>how are you?</p> A string of HTML, that will be created on the fly and inserted. A DOM element that will beinserted. An array of elements, all of which will be inserted. Any object, converted to a string, then a text node. Insert any number of elements after each of the matched elements. $("p").after("<p>I'm doing fine.</p>"); <p>How are you?</p><p>I'm doing fine.</p> <p>How are you?</p> 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. $("p").find("span").end(); $("p").find("span").end() == [ <p>...</p> ] <p><span>Hello</span>, how are you?</p> An expression to search with. 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. $("p").find("span"); $("p").find("span") == [ <span>Hello</span> ] <p><span>Hello</span>, how are you?</p> An expression to search with. 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. $("p").filter(".selected") $("p").filter(".selected") == [ <p class="selected">Hello</p> ] <p class="selected">Hello</p><p>How are you?</p> A set of expressions to evaluate against 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. $("p").filter([".selected", ":first"]) $("p").filter([".selected", ":first"]) == [ <p>Hello</p>, <p class="selected">And Again</p> ] <p>Hello</p><p>Hello Again</p><p class="selected">And Again</p> An element to remove from the set Removes the specified Element from the set of matched elements. This method is used to remove a single Element from a jQuery object. $("p").not( document.getElementById("selected") ) [ <p>Hello</p> ] <p>Hello</p><p id="selected">Hello Again</p> An expression with which to remove matching elements 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. $("p").not("#selected") [ <p>Hello</p> ] <p>Hello</p><p id="selected">Hello Again</p> An expression whose matched elements are added Adds the elements matched by the expression to the jQuery object. This can be used to concatenate the result sets of two expressions. $("p").add("span") [ <p>Hello</p>, <span>Hello Again</span> ] <p>Hello</p><p><span>Hello Again</span></p> An array of Elements to add 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. $("p").add([document.getElementById("a"), document.getElementById("b")]) [ <p>Hello</p>, <span id="a">Hello Again</span>, <span id="b">And Again</span> ] <p>Hello</p><p><span id="a">Hello Again</span><span id="b">And Again</span></p> An Element to add Adds a single Element to the set of matched elements. This is used to add a single Element to a jQuery object. $("p").add( document.getElementById("a") ) [ <p>Hello</p>, <span id="a">Hello Again</span> ] <p>Hello</p><p><span id="a">Hello Again</span></p> The function doing the DOM manipulation. The object to extend The object that will be merged into the first. Extend one object with another, returning the original, modified, object. This is a great utility for simple inheritance. The object, or array, to iterate over. The function that will be executed on every object. A generic iterator function, which can be used to seemlessly iterate over both objects and arrays. The string to trim. Remove the whitespace from the beginning and end of a string. The element to find the ancestors of. All ancestors of a given element. The element to find all the siblings of (including itself). All elements on a specified axis. The first array to merge. The second array to merge. Merge two arrays together, removing all duplicates. The Array to find items in. The function to process each item against. Invert the selection - select the opposite of the function. 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). The Array to translate. The function to process each item against. 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. A jQuery expression of elements to match. 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. $("p").appendTo("#foo"); <div id="foo"><p>I would like to say: </p></div> <p>I would like to say: </p><div id="foo"></div> A jQuery expression of elements to match. 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. $("p").prependTo("#foo"); <div id="foo"><p>I would like to say: </p><b>Hello</b></div> <p>I would like to say: </p><div id="foo"><b>Hello</b></div> A jQuery expression of elements to match. 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. $("p").insertBefore("#foo"); <p>I would like to say: </p><div id="foo">Hello</div> <div id="foo">Hello</div><p>I would like to say: </p> A jQuery expression of elements to match. 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. $("p").insertAfter("#foo"); <div id="foo">Hello</div><p>I would like to say: </p> <p>I would like to say: </p><div id="foo">Hello</div> Get the current CSS width of the first matched element. $("p").width(); "300px" <p>This is just a test.</p> Set the CSS property to the specified value. 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. $("p").width("20px"); <p style="width:20px;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS height of the first matched element. $("p").height(); "14px" <p>This is just a test.</p> Set the CSS property to the specified value. 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. $("p").height("20px"); <p style="height:20px;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS top of the first matched element. $("p").top(); "0px" <p>This is just a test.</p> Set the CSS property to the specified value. 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. $("p").top("20px"); <p style="top:20px;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS left of the first matched element. $("p").left(); "0px" <p>This is just a test.</p> Set the CSS property to the specified value. 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. $("p").left("20px"); <p style="left:20px;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS position of the first matched element. $("p").position(); "static" <p>This is just a test.</p> Set the CSS property to the specified value. Set the CSS position of every matched element. $("p").position("relative"); <p style="position:relative;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS float of the first matched element. $("p").float(); "none" <p>This is just a test.</p> Set the CSS property to the specified value. Set the CSS float of every matched element. $("p").float("left"); <p style="float:left;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS overflow of the first matched element. $("p").overflow(); "none" <p>This is just a test.</p> Set the CSS property to the specified value. Set the CSS overflow of every matched element. $("p").overflow("auto"); <p style="overflow:auto;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS color of the first matched element. $("p").color(); "black" <p>This is just a test.</p> Set the CSS property to the specified value. Set the CSS color of every matched element. $("p").color("blue"); <p style="color:blue;">This is just a test.</p> <p>This is just a test.</p> Get the current CSS background of the first matched element. $("p").background(); "" <p>This is just a test.</p> Set the CSS property to the specified value. Set the CSS background of every matched element. $("p").background("blue"); <p style="background:blue;">This is just a test.</p> <p>This is just a test.</p> Get the current value of the first matched element. $("input").val(); "some text" <input type="text" value="some text"/> Set the property to the specified value. Set the value of every matched element. $("input").value("test"); <input type="text" value="test"/> <input type="text" value="some text"/> Get the html contents of the first matched element. $("div").html(); <input/> <div><input/></div> Set the html contents to the specified value. Set the html contents of every matched element. $("div").html("<b>new stuff</b>"); <div><b>new stuff</b></div> <div><input/></div> Get the current id of the first matched element. $("input").id(); "test" <input type="text" id="test" value="some text"/> Set the property to the specified value. Set the id of every matched element. $("input").id("newid"); <input type="text" id="newid" value="some text"/> <input type="text" id="test" value="some text"/> Get the current title of the first matched element. $("img").title(); "my image" <img src="test.jpg" title="my image"/> Set the property to the specified value. Set the title of every matched element. $("img").title("new title"); <img src="test.jpg" title="new image"/> <img src="test.jpg" title="my image"/> Get the current name of the first matched element. $("input").name(); "username" <input type="text" name="username"/> Set the property to the specified value. Set the name of every matched element. $("input").name("user"); <input type="text" name="user"/> <input type="text" name="username"/> Get the current href of the first matched element. $("a").href(); "test.html" <a href="test.html">my link</a> Set the property to the specified value. Set the href of every matched element. $("a").href("test2.html"); <a href="test2.html">my link</a> <a href="test.html">my link</a> Get the current src of the first matched element. $("img").src(); "test.jpg" <img src="test.jpg" title="my image"/> Set the property to the specified value. Set the src of every matched element. $("img").src("test2.jpg"); <img src="test2.jpg" title="my image"/> <img src="test.jpg" title="my image"/> Get the current rel of the first matched element. $("a").rel(); "nofollow" <a href="test.html" rel="nofollow">my link</a> Set the property to the specified value. Set the rel of every matched element. $("a").rel("nofollow"); <a href="test.html" rel="nofollow">my link</a> <a href="test.html">my link</a> Get a set of elements containing the unique parents of the matched set of elements. $("p").parent() [ <div><p>Hello</p><p>Hello</p></div> ] <div><p>Hello</p><p>Hello</p></div> An expression to filter the parents with Get a set of elements containing the unique parents of the matched set of elements, and filtered by an expression. $("p").parent(".selected") [ <div class="selected"><p>Hello Again</p></div> ] <div><p>Hello</p></div><div class="selected"><p>Hello Again</p></div> Get a set of elements containing the unique ancestors of the matched set of elements. $("span").ancestors() [ <body>...</body>, <div>...</div>, <p><span>Hello</span></p> ] <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html> An expression to filter the ancestors with Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression. $("span").ancestors("p") [ <p><span>Hello</span></p> ] <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html> Get a set of elements containing the unique ancestors of the matched set of elements. $("span").ancestors() [ <body>...</body>, <div>...</div>, <p><span>Hello</span></p> ] <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html> An expression to filter the ancestors with Get a set of elements containing the unique ancestors of the matched set of elements, and filtered by an expression. $("span").ancestors("p") [ <p><span>Hello</span></p> ] <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html> 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. $("p").next() [ <p>Hello Again</p>, <div><span>And Again</span></div> ] <p>Hello</p><p>Hello Again</p><div><span>And Again</span></div> An expression to filter the next Elements with 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. $("p").next(".selected") [ <p class="selected">Hello Again</p> ] <p>Hello</p><p class="selected">Hello Again</p><div><span>And Again</span></div> 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. $("p").previous() [ <div><span>Hello Again</span></div> ] <p>Hello</p><div><span>Hello Again</span></div><p>And Again</p> An expression to filter the previous Elements with 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. $("p").previous(".selected") [ <div><span>Hello</span></div> ] <div><span>Hello</span></div><p class="selected">Hello Again</p><p>And Again</p> Get a set of elements containing all of the unique siblings of each of the matched set of elements. $("div").siblings() [ <p>Hello</p>, <p>And Again</p> ] <p>Hello</p><div><span>Hello Again</span></div><p>And Again</p> An expression to filter the sibling Elements with Get a set of elements containing all of the unique siblings of each of the matched set of elements, and filtered by an expression. $("div").siblings(".selected") [ <p class="selected">Hello Again</p> ] <div><span>Hello</span></div><p class="selected">Hello Again</p><p>And Again</p> Get a set of elements containing all of the unique children of each of the matched set of elements. $("div").children() [ <span>Hello Again</span> ] <p>Hello</p><div><span>Hello Again</span></div><p>And Again</p> An expression to filter the child Elements with Get a set of elements containing all of the unique children of each of the matched set of elements, and filtered by an expression. $("div").children(".selected") [ <p class="selected">Hello Again</p> ] <div><span>Hello</span><p class="selected">Hello Again</p><p>And Again</p></div> Displays each of the set of matched elements if they are hidden. $("p").show() [ <p style="display: block">Hello</p> ] <p style="display: none">Hello</p> Hides each of the set of matched elements if they are shown. $("p").hide() [ <p style="display: none">Hello</p> ] <p>Hello</p> Toggles each of the set of matched elements. If they are shown, toggle makes them hidden. If they are hidden, toggle makes them shown. $("p").toggle() [ <p style="display: none">Hello</p>, <p style="display: block">Hello Again</p> ] <p>Hello</p><p style="display: none">Hello Again</p> A CSS class to add to the elements Adds the specified class to each of the set of matched elements. $("p").addClass("selected") [ <p class="selected">Hello</p> ] <p>Hello</p> A CSS class to remove from the elements Removes the specified class from the set of matched elements. $("p").removeClass("selected") [ <p>Hello</p> ] <p class="selected">Hello</p> A CSS class with which to toggle the elements Adds the specified class if it is present, removes it if it is not present. $("p").toggleClass("selected") [ <p class="selected">Hello</p>, <p>Hello Again</p> ] <p>Hello</p><p class="selected">Hello Again</p> Removes all matched elements from the DOM. This does NOT remove them from the jQuery object, allowing you to use the matched elements further. $("p").remove(); how are <p>Hello</p> how are <p>you?</p> A jQuery expression to filter elements by. 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. $("p").remove(".hello"); how are <p>you?</p> <p class="hello">Hello</p> how are <p>you?</p> Removes all child nodes from the set of matched elements. $("p").empty() [ <p></p> ] <p>Hello, <span>Person</span> <a href="#">and person</a></p> An event type A function to bind to the event on each of the set of matched elements Binds a particular event (like click) to a each of a set of match elements. $("p").bind( "click", function() { alert("Hello"); } ) [ <p>Hello</p> ]

Cancel a default action and prevent it from bubbling by returning false
from your function.
<p>Hello</p>
$("form").bind( "submit", function() { return false; } )

Cancel a default action by using the preventDefault method.
$("form").bind( "submit", function() { e.preventDefault(); } )

Stop an event from bubbling by using the stopPropogation method.
$("form").bind( "submit", function() { e.stopPropogation(); } )
An event type A function to unbind from the event on each of the set of matched elements 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. $("p").unbind( "click", function() { alert("Hello"); } ) [ <p>Hello</p> ] <p onclick="alert('Hello');">Hello</p> An event type Removes all bound events of a particular type from each of the matched elements. $("p").unbind( "click" ) [ <p>Hello</p> ] <p onclick="alert('Hello');">Hello</p> Removes all bound events from each of the matched elements. $("p").unbind() [ <p>Hello</p> ] <p onclick="alert('Hello');">Hello</p> An event type to trigger. Trigger a type of event on every matched element. $("p").trigger("click") alert('hello') <p click="alert('hello')">Hello</p> The function to execute on every even click. The function to execute on every odd click. 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. $("p").toggle(function(){
$(this).addClass("selected");
},function(){
$(this).removeClass("selected");
});
The function to fire whenever the mouse is moved over a matched element. The function to fire whenever the mouse is moved off of a matched element. 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). $("p").hover(function(){
$(this).addClass("over");
},function(){
$(this).addClass("out");
});
The function to be executed when the DOM is ready. 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. $(document).ready(function(){ Your code here... }); A function to bind to the blur event on each of the matched elements. Bind a function to the blur event of each matched element. $("p").blur( function() { alert("Hello"); } ); <p onblur="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").blur(); alert('Hello'); <p onblur="alert('Hello');">Hello</p> A function to bind to the blur event on each of the matched elements. 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). $("p").oneblur( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first blur <p onblur="alert('Hello');">Hello</p> A function to unbind from the blur event on each of the matched elements. 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. $("p").unblur( myFunction ); <p>Hello</p> <p onblur="myFunction">Hello</p> Removes all bound blur events from each of the matched elements. $("p").unblur(); <p>Hello</p> <p onblur="alert('Hello');">Hello</p> A function to bind to the focus event on each of the matched elements. Bind a function to the focus event of each matched element. $("p").focus( function() { alert("Hello"); } ); <p onfocus="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").focus(); alert('Hello'); <p onfocus="alert('Hello');">Hello</p> A function to bind to the focus event on each of the matched elements. 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). $("p").onefocus( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first focus <p onfocus="alert('Hello');">Hello</p> A function to unbind from the focus event on each of the matched elements. 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. $("p").unfocus( myFunction ); <p>Hello</p> <p onfocus="myFunction">Hello</p> Removes all bound focus events from each of the matched elements. $("p").unfocus(); <p>Hello</p> <p onfocus="alert('Hello');">Hello</p> A function to bind to the load event on each of the matched elements. Bind a function to the load event of each matched element. $("p").load( function() { alert("Hello"); } ); <p onload="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").load(); alert('Hello'); <p onload="alert('Hello');">Hello</p> A function to bind to the load event on each of the matched elements. 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). $("p").oneload( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first load <p onload="alert('Hello');">Hello</p> A function to unbind from the load event on each of the matched elements. 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. $("p").unload( myFunction ); <p>Hello</p> <p onload="myFunction">Hello</p> Removes all bound load events from each of the matched elements. $("p").unload(); <p>Hello</p> <p onload="alert('Hello');">Hello</p> A function to bind to the resize event on each of the matched elements. Bind a function to the resize event of each matched element. $("p").resize( function() { alert("Hello"); } ); <p onresize="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").resize(); alert('Hello'); <p onresize="alert('Hello');">Hello</p> A function to bind to the resize event on each of the matched elements. 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). $("p").oneresize( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first resize <p onresize="alert('Hello');">Hello</p> A function to unbind from the resize event on each of the matched elements. 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. $("p").unresize( myFunction ); <p>Hello</p> <p onresize="myFunction">Hello</p> Removes all bound resize events from each of the matched elements. $("p").unresize(); <p>Hello</p> <p onresize="alert('Hello');">Hello</p> A function to bind to the scroll event on each of the matched elements. Bind a function to the scroll event of each matched element. $("p").scroll( function() { alert("Hello"); } ); <p onscroll="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").scroll(); alert('Hello'); <p onscroll="alert('Hello');">Hello</p> A function to bind to the scroll event on each of the matched elements. 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). $("p").onescroll( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first scroll <p onscroll="alert('Hello');">Hello</p> A function to unbind from the scroll event on each of the matched elements. 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. $("p").unscroll( myFunction ); <p>Hello</p> <p onscroll="myFunction">Hello</p> Removes all bound scroll events from each of the matched elements. $("p").unscroll(); <p>Hello</p> <p onscroll="alert('Hello');">Hello</p> A function to bind to the unload event on each of the matched elements. Bind a function to the unload event of each matched element. $("p").unload( function() { alert("Hello"); } ); <p onunload="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").unload(); alert('Hello'); <p onunload="alert('Hello');">Hello</p> A function to bind to the unload event on each of the matched elements. 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). $("p").oneunload( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first unload <p onunload="alert('Hello');">Hello</p> A function to unbind from the unload event on each of the matched elements. 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. $("p").ununload( myFunction ); <p>Hello</p> <p onunload="myFunction">Hello</p> Removes all bound unload events from each of the matched elements. $("p").ununload(); <p>Hello</p> <p onunload="alert('Hello');">Hello</p> A function to bind to the click event on each of the matched elements. Bind a function to the click event of each matched element. $("p").click( function() { alert("Hello"); } ); <p onclick="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").click(); alert('Hello'); <p onclick="alert('Hello');">Hello</p> A function to bind to the click event on each of the matched elements. 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). $("p").oneclick( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first click <p onclick="alert('Hello');">Hello</p> A function to unbind from the click event on each of the matched elements. 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. $("p").unclick( myFunction ); <p>Hello</p> <p onclick="myFunction">Hello</p> Removes all bound click events from each of the matched elements. $("p").unclick(); <p>Hello</p> <p onclick="alert('Hello');">Hello</p> A function to bind to the dblclick event on each of the matched elements. Bind a function to the dblclick event of each matched element. $("p").dblclick( function() { alert("Hello"); } ); <p ondblclick="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").dblclick(); alert('Hello'); <p ondblclick="alert('Hello');">Hello</p> A function to bind to the dblclick event on each of the matched elements. 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). $("p").onedblclick( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first dblclick <p ondblclick="alert('Hello');">Hello</p> A function to unbind from the dblclick event on each of the matched elements. 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. $("p").undblclick( myFunction ); <p>Hello</p> <p ondblclick="myFunction">Hello</p> Removes all bound dblclick events from each of the matched elements. $("p").undblclick(); <p>Hello</p> <p ondblclick="alert('Hello');">Hello</p> A function to bind to the mousedown event on each of the matched elements. Bind a function to the mousedown event of each matched element. $("p").mousedown( function() { alert("Hello"); } ); <p onmousedown="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").mousedown(); alert('Hello'); <p onmousedown="alert('Hello');">Hello</p> A function to bind to the mousedown event on each of the matched elements. 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). $("p").onemousedown( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first mousedown <p onmousedown="alert('Hello');">Hello</p> A function to unbind from the mousedown event on each of the matched elements. 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. $("p").unmousedown( myFunction ); <p>Hello</p> <p onmousedown="myFunction">Hello</p> Removes all bound mousedown events from each of the matched elements. $("p").unmousedown(); <p>Hello</p> <p onmousedown="alert('Hello');">Hello</p> A function to bind to the mouseup event on each of the matched elements. Bind a function to the mouseup event of each matched element. $("p").mouseup( function() { alert("Hello"); } ); <p onmouseup="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").mouseup(); alert('Hello'); <p onmouseup="alert('Hello');">Hello</p> A function to bind to the mouseup event on each of the matched elements. 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). $("p").onemouseup( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first mouseup <p onmouseup="alert('Hello');">Hello</p> A function to unbind from the mouseup event on each of the matched elements. 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. $("p").unmouseup( myFunction ); <p>Hello</p> <p onmouseup="myFunction">Hello</p> Removes all bound mouseup events from each of the matched elements. $("p").unmouseup(); <p>Hello</p> <p onmouseup="alert('Hello');">Hello</p> A function to bind to the mousemove event on each of the matched elements. Bind a function to the mousemove event of each matched element. $("p").mousemove( function() { alert("Hello"); } ); <p onmousemove="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").mousemove(); alert('Hello'); <p onmousemove="alert('Hello');">Hello</p> A function to bind to the mousemove event on each of the matched elements. 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). $("p").onemousemove( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first mousemove <p onmousemove="alert('Hello');">Hello</p> A function to unbind from the mousemove event on each of the matched elements. 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. $("p").unmousemove( myFunction ); <p>Hello</p> <p onmousemove="myFunction">Hello</p> Removes all bound mousemove events from each of the matched elements. $("p").unmousemove(); <p>Hello</p> <p onmousemove="alert('Hello');">Hello</p> A function to bind to the mouseover event on each of the matched elements. Bind a function to the mouseover event of each matched element. $("p").mouseover( function() { alert("Hello"); } ); <p onmouseover="alert('Hello');">Hello</p> <p>Hello</p> Trigger the mouseover event of each matched element. This causes all of the functions that have been bound to thet mouseover event to be executed. $("p").mouseover(); alert('Hello'); <p onmouseover="alert('Hello');">Hello</p> A function to bind to the mouseover event on each of the matched elements. 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). $("p").onemouseover( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first mouseover <p onmouseover="alert('Hello');">Hello</p> A function to unbind from the mouseover event on each of the matched elements. 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. $("p").unmouseover( myFunction ); <p>Hello</p> <p onmouseover="myFunction">Hello</p> Removes all bound mouseover events from each of the matched elements. $("p").unmouseover(); <p>Hello</p> <p onmouseover="alert('Hello');">Hello</p> A function to bind to the mouseout event on each of the matched elements. Bind a function to the mouseout event of each matched element. $("p").mouseout( function() { alert("Hello"); } ); <p onmouseout="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").mouseout(); alert('Hello'); <p onmouseout="alert('Hello');">Hello</p> A function to bind to the mouseout event on each of the matched elements. 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). $("p").onemouseout( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first mouseout <p onmouseout="alert('Hello');">Hello</p> A function to unbind from the mouseout event on each of the matched elements. 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. $("p").unmouseout( myFunction ); <p>Hello</p> <p onmouseout="myFunction">Hello</p> Removes all bound mouseout events from each of the matched elements. $("p").unmouseout(); <p>Hello</p> <p onmouseout="alert('Hello');">Hello</p> A function to bind to the change event on each of the matched elements. Bind a function to the change event of each matched element. $("p").change( function() { alert("Hello"); } ); <p onchange="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").change(); alert('Hello'); <p onchange="alert('Hello');">Hello</p> A function to bind to the change event on each of the matched elements. 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). $("p").onechange( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first change <p onchange="alert('Hello');">Hello</p> A function to unbind from the change event on each of the matched elements. 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. $("p").unchange( myFunction ); <p>Hello</p> <p onchange="myFunction">Hello</p> Removes all bound change events from each of the matched elements. $("p").unchange(); <p>Hello</p> <p onchange="alert('Hello');">Hello</p> A function to bind to the reset event on each of the matched elements. Bind a function to the reset event of each matched element. $("p").reset( function() { alert("Hello"); } ); <p onreset="alert('Hello');">Hello</p> <p>Hello</p> Trigger the reset event of each matched element. This causes all of the functions that have been bound to thet reset event to be executed. $("p").reset(); alert('Hello'); <p onreset="alert('Hello');">Hello</p> A function to bind to the reset event on each of the matched elements. Bind a function to the reset event of each matched element, which will only be executed once. Unlike a call to the normal .reset() method, calling .onereset() causes the bound function to be only executed the first time it is triggered, and never again (unless it is re-bound). $("p").onereset( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first reset <p onreset="alert('Hello');">Hello</p> A function to unbind from the reset event on each of the matched elements. Removes a bound reset event from each of the matched elements. You must pass the identical function that was used in the original bind method. $("p").unreset( myFunction ); <p>Hello</p> <p onreset="myFunction">Hello</p> Removes all bound reset events from each of the matched elements. $("p").unreset(); <p>Hello</p> <p onreset="alert('Hello');">Hello</p> A function to bind to the select event on each of the matched elements. Bind a function to the select event of each matched element. $("p").select( function() { alert("Hello"); } ); <p onselect="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").select(); alert('Hello'); <p onselect="alert('Hello');">Hello</p> A function to bind to the select event on each of the matched elements. 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). $("p").oneselect( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first select <p onselect="alert('Hello');">Hello</p> A function to unbind from the select event on each of the matched elements. 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. $("p").unselect( myFunction ); <p>Hello</p> <p onselect="myFunction">Hello</p> Removes all bound select events from each of the matched elements. $("p").unselect(); <p>Hello</p> <p onselect="alert('Hello');">Hello</p> A function to bind to the submit event on each of the matched elements. Bind a function to the submit event of each matched element. $("p").submit( function() { alert("Hello"); } ); <p onsubmit="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").submit(); alert('Hello'); <p onsubmit="alert('Hello');">Hello</p> A function to bind to the submit event on each of the matched elements. 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). $("p").onesubmit( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first submit <p onsubmit="alert('Hello');">Hello</p> A function to unbind from the submit event on each of the matched elements. 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. $("p").unsubmit( myFunction ); <p>Hello</p> <p onsubmit="myFunction">Hello</p> Removes all bound submit events from each of the matched elements. $("p").unsubmit(); <p>Hello</p> <p onsubmit="alert('Hello');">Hello</p> A function to bind to the keydown event on each of the matched elements. Bind a function to the keydown event of each matched element. $("p").keydown( function() { alert("Hello"); } ); <p onkeydown="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").keydown(); alert('Hello'); <p onkeydown="alert('Hello');">Hello</p> A function to bind to the keydown event on each of the matched elements. 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). $("p").onekeydown( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first keydown <p onkeydown="alert('Hello');">Hello</p> A function to unbind from the keydown event on each of the matched elements. 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. $("p").unkeydown( myFunction ); <p>Hello</p> <p onkeydown="myFunction">Hello</p> Removes all bound keydown events from each of the matched elements. $("p").unkeydown(); <p>Hello</p> <p onkeydown="alert('Hello');">Hello</p> A function to bind to the keypress event on each of the matched elements. Bind a function to the keypress event of each matched element. $("p").keypress( function() { alert("Hello"); } ); <p onkeypress="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").keypress(); alert('Hello'); <p onkeypress="alert('Hello');">Hello</p> A function to bind to the keypress event on each of the matched elements. 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). $("p").onekeypress( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first keypress <p onkeypress="alert('Hello');">Hello</p> A function to unbind from the keypress event on each of the matched elements. 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. $("p").unkeypress( myFunction ); <p>Hello</p> <p onkeypress="myFunction">Hello</p> Removes all bound keypress events from each of the matched elements. $("p").unkeypress(); <p>Hello</p> <p onkeypress="alert('Hello');">Hello</p> A function to bind to the keyup event on each of the matched elements. Bind a function to the keyup event of each matched element. $("p").keyup( function() { alert("Hello"); } ); <p onkeyup="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").keyup(); alert('Hello'); <p onkeyup="alert('Hello');">Hello</p> A function to bind to the keyup event on each of the matched elements. 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). $("p").onekeyup( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first keyup <p onkeyup="alert('Hello');">Hello</p> A function to unbind from the keyup event on each of the matched elements. 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. $("p").unkeyup( myFunction ); <p>Hello</p> <p onkeyup="myFunction">Hello</p> Removes all bound keyup events from each of the matched elements. $("p").unkeyup(); <p>Hello</p> <p onkeyup="alert('Hello');">Hello</p> A function to bind to the error event on each of the matched elements. Bind a function to the error event of each matched element. $("p").error( function() { alert("Hello"); } ); <p onerror="alert('Hello');">Hello</p> <p>Hello</p> 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. $("p").error(); alert('Hello'); <p onerror="alert('Hello');">Hello</p> A function to bind to the error event on each of the matched elements. 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). $("p").oneerror( function() { alert("Hello"); } ); alert('Hello'); // Only executed for the first error <p onerror="alert('Hello');">Hello</p> A function to unbind from the error event on each of the matched elements. 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. $("p").unerror( myFunction ); <p>Hello</p> <p onerror="myFunction">Hello</p> Removes all bound error events from each of the matched elements. $("p").unerror(); <p>Hello</p> <p onerror="alert('Hello');">Hello</p> 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). 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. $("p").show("slow"); 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). A function to be executed whenever the animation completes. 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. $("p").show("slow",function(){
alert("Animation Done.");
});
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). 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. $("p").hide("slow"); 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). A function to be executed whenever the animation completes. 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. $("p").hide("slow",function(){
alert("Animation Done.");
});
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). 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. $("p").slideDown("slow"); 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). A function to be executed whenever the animation completes. 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. $("p").slideDown("slow",function(){
alert("Animation Done.");
});
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). 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. $("p").slideUp("slow"); 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). A function to be executed whenever the animation completes. 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. $("p").slideUp("slow",function(){
alert("Animation Done.");
});
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). 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. $("p").fadeIn("slow"); 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). A function to be executed whenever the animation completes. 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. $("p").fadeIn("slow",function(){
alert("Animation Done.");
});
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). 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. $("p").fadeOut("slow"); 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). A function to be executed whenever the animation completes. 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. $("p").fadeOut("slow",function(){
alert("Animation Done.");
});
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). The opacity to fade to (a number from 0 to 1). 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. $("p").fadeTo("slow", 0.5); 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). The opacity to fade to (a number from 0 to 1). A function to be executed whenever the animation completes. 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. $("p").fadeTo("slow", 0.5, function(){
alert("Animation Done.");
});