I've been trying to get all the markup between li tags and move it to another div on the page. I have tried using html, innerhtml, and children. But, it just returns [object Object]...
The html (highly modified for simplicity):
<ul>
<li class="add">I want this</li>
<li class="add">I don't want this</li>
</ul>
<div id="second">
<!-- i want to insert here -->
</div>
This is the most current iteration of jQuery code...
$('li.add').click(function() {
var thisitem = $(this).html();
$("#selections").append(thisItem);
});
$('li.add').click(function() {
var thisitem = $(this).html();
$("#second").append(thisitem);
});