Reputation: 2973
I am trying to clone the current contents of the li with the nested in them also and append them to the ul.
Here is the html
<ul id="gList">
<li><a id="1" href="#"><img src="image.jpg"/></a></li>
<li><a id="2" href="#"><img src="image.jpg"/></a></li>
<li><a id="3" href="#"><img src="image.jpg"/></a></li>
<li><a id="4" href="#"><img src="image.jpg"/></a></li>
</ul>
and my jquery which does not work.
$('ul#gList').clone('li>*').append('ul#gList');
I had done it last night but for some reason sublime has overwritten the file and it has stopped working.
Upvotes: 0
Views: 2686