I have a list of <li>
elements:
<ul id="mylist">
<li id="item1">Item 1</li>
<li id="item2">Item 2</li>
<li id="item3">Item 3</li>
</ul>
Can I swap two <li>
elements - say item1 and item2 - with the replaceChild
, one of the DOM tree modification methods? Will it work in all browsers?