Insert every element in the set of matched elements to the beginning of the target.
Element to prepend elements to.
The instance itself.
$('<li class="plum">Plum</li>').prependTo('#fruits');$.html();//=> <ul id="fruits">// <li class="plum">Plum</li>// <li class="apple">Apple</li>// <li class="orange">Orange</li>// <li class="pear">Pear</li>// </ul> Copy
$('<li class="plum">Plum</li>').prependTo('#fruits');$.html();//=> <ul id="fruits">// <li class="plum">Plum</li>// <li class="apple">Apple</li>// <li class="orange">Orange</li>// <li class="pear">Pear</li>// </ul>
https://api.jquery.com/prependTo/
Insert every element in the set of matched elements to the beginning of the target.