Insert every element in the set of matched elements to the beginning of the target.
$.t('<li>', { text: 'Start' }).prependTo('ul');
<ul>
<li>Start</li>
<li>End</li>
</ul>
$('.new-item').prependTo('#feed');
<div id="feed">
<div class="new-item">...</div>
<!-- existing feed items -->
</div>
| Parameter | Type | Description |
|---|---|---|
| target | string | element | SR | A selector, element, or SR object. The matched elements will be inserted at the beginning of this target. |
Returns: A new SR object containing all inserted elements.