tags:

views:

3041

answers:

2

I have this unordered list

<ul>
   <li>two</li>
   <li>three</li>
</ul>

Is there a way I can prepend to the unordered list so that it ends up like this?

<ul>
   <li>ONE</li>
   <li>two</li>
   <li>three</li>
</ul>

Notice the "ONE" is added to the FRONT/TOP of the list.

+13  A: 
$("ul").prepend("<li>ONE</li>");
dasony
+5  A: 

Something simple like this ought to work:

$("ul").prepend("<li>ONE</li>");
nezroy