Easy Tutorial
❮ Jquery Animate Misc Globaleval ❯

jQuery pushStack() Method

jQuery Miscellaneous Methods

Example

Push some elements onto the jQuery stack, remove them, and then revert back to the state just before they were pushed onto the stack.

<div></div>
<script>
$(function () { 
    $().pushStack( document.getElementsByTagName("div")).remove().end();
})
</script>

Definition and Usage

The pushStack() function is used to add a set of DOM elements to the jQuery stack.


Syntax

Usage One

Parameter Description
element Array type The array elements to be pushed onto the jQuery stack, used to create a new jQuery object
name Optional. String type The name of the jQuery method that generates the array elements
arguments Optional. Array type The arguments passed to the jQuery method (for serialization)

jQuery Miscellaneous Methods

❮ Jquery Animate Misc Globaleval ❯