how do i use jquery to replace what I have in the first ul with what I have in the second ul?
$('li').each(function() {
alert($(this).text()); //so far this is what I have which alerts me with all the li's text.
});
<ul>
<li>apple</li>
<li>peach</li>
<ul>
<li>juice</li>
<li>candy</li>
</ul>
Fiddle: http://jsfiddle.net/c4vh9/