tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

jQuery.pushStack()

jQuery.pushStack( elements )

Returns: jQuery

Description: Add a collection of DOM elements onto the jQuery stack.

jQuery.pushStack( elements )

version added: 1.0
elements
An array of elements to push onto the stack and make into a new jQuery object.

jQuery.pushStack( elements, name, arguments )

version added: 1.3
elements
An array of elements to push onto the stack and make into a new jQuery object.
name
The name of a jQuery method that generated the array of elements.
arguments
The arguments that were passed in to the jQuery method (for serialization).

Example

Add some elements onto the jQuery stack, then pop back off again.
jQuery([])
    .pushStack( document.getElementsByTagName("div") )
        .remove()
    .end();
Was this information helpful?
   

Comments