jQuery addBack() Method

Last Updated Jul 21, 2015, 12:00:06 PM

jQuery addBack() Method

jQuery addBack() traversal method adds the previous set of elements on to the current set, optionally filtered by a selector.

jQuery .addBack() method adds previous DOM element to the current set and maintains them in the internal stack which will take care of changes to the matched set of elements.

A Set of new elements will be pushed onto the stack when DOM traversal method being called. The advantage with jQuery .addBack() method is to get access on the previous set of elements.


The below example explains how to use jQuery.addBack() method and also we will understand the difference before using jQuery addBack() method and after using jQuery addBack() method

Try It Now

Other Advanced jQuery Traversing Methods you might want to learn

jQuery Traversal Reference

jQuery Basic Traversing

jQuery Traversal Filters

jQuery Traversing Methods

Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 21, 2015, 12:00:06 PM