What's the difference between $.add and $.append JQuery

javascript, jquery

Solution

Given a jQuery object that represents a set of DOM elements, the `.add()` method constructs a new jQuery object from the union of those elements and the ones passed into the method. But it does not insert the element into the DOM, i.e using `.add()` the element will be added to the DOM but to see it in the page you have to insert it in the page using some insertion/append method.

Problem

I was wondering and couldn't get any best documentation that what's the difference between $.add and $.append when we have single element to add or append to a container. Thanks in Advance

Original source