How to append a listitem in first position of list using Jquery

Viewed 46599

How to append a listitem in first position of list using Jquery?

<ul id="mylist">
  <li>First</li>
  <li>Second</li>
  <li>Third</li>
  <li>Fourth</li>  
</ul>

is it possible to append a list item before first <li> with jquery. I try to $('#mylist li:eq(1)').before("<li></li>"). But it not works?

3 Answers
Related