How to append some text to all paragraphs using jQuery ?
In this article, we will append some text to all paragraph elements using jQuery. To append some text to all paragraph elements, we use append() and document.createTextNode() methods.
jQuery append() method is used to insert some content at the end of the selected elements.
$(selector).append( content, function(index, html) )
Before Click the Button:
After Click Button:
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.