Misc Pushstack
# jQuery pushStack() Method
[jQuery Misc Methods](#)
## Example
Push some elements onto the jQuery stack, then remove them, and then go back to the state just after the push.
$(function(){ $().pushStack(document.getElementsByTagName("div")).remove().end(); })
[Try it yourself >>](#)
* * *
## Definition and Usage
The pushStack() function is used to add a collection of DOM elements to the jQuery stack.
* * *
## Syntax
Syntax 1
pushStack( elements, name, arguments )
| Parameter | Description |
| :--- | :--- |
| _element_ | Array type. The array elements to be pushed onto the jQuery stack, used to generate a new jQuery object. |
| _name_ | Optional. String type. The name of the jQuery method that generated the array elements. |
| _arguments_ | Optional. Array type. The arguments passed to the jQuery method (used for serialization). |
* * jQuery Misc Methods](#)
YouTip