.pushStack()

Add a collection of DOM elements onto the jQuery stack.

.pushStack(elements)👒 jQuery

elements Array An array of elements to push onto the stack and make into a new jQuery object.

.pushStack(elements, name, arguments)👒 jQuery

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

Add some elements onto the jQuery stack, then pop back off again.

HTML
jQuery([]).pushStack(document.getElementsByTagName("div")).remove().end();
DEMO

Looking for a Web Developer?

πŸ‘‹

Hi! I'm Basti, author of this site. If you are looking for a web developer with 15+ years of experience, holla at me!

Be it the good 'ol jQuery, vanilla JS or modern frameworks like Vue and Svelte, front- or backend, I can help you.

Just write me at jobs@jqapi.com :)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /