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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.