[Solved] Why cant I append a jquery object to a ul element


No need to iterate over each li element. You can append with them in the selector

 $("#second").append($('#first li'));
#second {
  background: green;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<ul id="first">

  <li>Test</li>
  <li id="test">Test 2</li>
</ul>

<ul id="second">
</ul>

0

solved Why cant I append a jquery object to a ul element