Inserts content, specified by the parameter, after each element in the set of matched elements.
$('p').after('<hr>');
<p>Paragraph content</p>
<hr>
// Moves #sidebar element after .container
$('.container').after($('#sidebar'));
<div class="container">...</div>
<div id="sidebar">...</div>
const $newDiv = $.t('<div>', { text: 'Footer' });
$('main').after($newDiv);
<main>...</main>
<div>Footer</div>
| Parameter | Type | Description |
|---|---|---|
| content | string | element | SR | HTML string, DOM element, or SR object to insert after each matched element. |
Returns: The original SR object for chaining.