
To place content after a specific html element, after()
method can be used.
<script>
$("h1").after("<h2>This should be the sub heading</h2>");
</script>
Above code snippet will place the specified text (<h2>This should be the sub heading</h2>) after “h1” element of the web page.
Views: 4584 | Post Order: 50