How to insert a jQuery object after all paragraphs using jQuery ?
The task is to insert a jQuery object after all the paragraphs using jQuery.
- Create DOM element or jQuery object using <span> tag.
- Create a paragraph using <p> tag.
- Create a button using button tag after clicking on which the object will be inserted after paragraph.
- Write a script that will call a function jQuery.after() which is used to insert a jQuery object after all the paragraphs.
Example: Below is the working code using the above-mentioned steps.