How to add new elements to DOM in jQuery?

Posted by Prem Tiwari | Updated on

Answer: Use the jQuery append() or prepend() method

Want to add new elements to DOM in jQuery? Use the following code add new elements to DOM in jQuery.

Here is another example to add new elements to DOM in jQuery:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers