jeudi 12 février 2015

How to merge two UL with JQuery so that the values alternate?


I'm trying to merge two UL with JQuery so that the values alternate. How can I merge the following :



<ul id="1">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>

<ul id="2">
<li>a</li>
<li>b</li>
<li>c</li>
</ul>


To something like this :



<ul id="1">
<li>1</li>
<li>a</li>
<li>2</li>
<li>b</li>
<li>3</li>
<li>c</li>
</ul>


With JQuery ?


Thanks.





Aucun commentaire:

Enregistrer un commentaire