Insert content to the beginning of each element in the set of matched elements.
// <ul><li>B</li></ul>
$('ul').prepend('<li>A</li>');
<ul>
<li>A</li>
<li>B</li>
</ul>
const $icon = $.t('<i>');
$('button').prepend($icon);
<button>
<i></i>
Click Text
</button>
| Parameter | Type | Description |
|---|---|---|
| content | string | element | SR | HTML string, DOM element, or SR object to insert at the beginning of each matched element. |
Returns: The original SR object for chaining.