I have an ordered list in HTML.
<ol class="btns">
<li>First item</li>
<li>Second item</li>
<!--Third one goes here-->
<li>Four item</li>
</ol>
I want to add a new list item with js into third order. How can I do that?
Here's demo: http://jsbin.com/akahow/2/edit
More info: appendChild
adds new item to end of list, I tried insertBefore
but failed, only I could done with insertBefore
adding it to first place. But I want to put it third place.