Inserts content to the end of each element in the set of matched elements.
$('ul').append('<li>New Item</li>');
<ul>
<li>Existing Item</li>
<li>New Item</li>
</ul>
// Moves #footer to inside .container
$('.container').append($('#footer'));
<div class="container">
<!-- other content -->
<div id="footer">...</div>
</div>
const $spans = $('span.highlight');
$('div').append($spans);
<div>
<!-- other content -->
<span class="highlight">...</span>
</div>
| Parameter | Type | Description |
|---|---|---|
| content | string | element | SR | HTML string, DOM element, or SR object to insert at the end of each matched element. |
Returns: The original SR object for chaining.