I'm hoping there is an easy fix to my problem. I'm basically doing a simple jquery search and the return value is an array with a nested set of span html elements. So a query like this:
$('.sqs-simple-like').eq(0);
Would return the first object that has the same class structure of '.sqs-simple-like'. When I query this in the console of the developer window, it returns this:
[<span class="sqs-simple-like" data-item-id="db8a2c74088b44608eed112e15e45207" data-like-count="0" id="yui_5a41b52d-e23f-449d-a828-981814b19c5e">
<span class="like-icon"></span><span class="like-count">0 Likes
</span>
</span>]
So, it returns an array with a nested set of span items. Essentially, I want to use the entire return object as a simple string. Basically, I just want to insert this nested span element into another div on my site. However, I can't seem to access the return value as a simple string. If I use the .html() method, it only returns the inner span element (but not the entire nested structure). I've tried searching for other methods, but nothing seems to work. The .toString() method doesn't seem to work either. Is there some other method by which I can convert this nested span element into a simple string?
sqs-simple-likespan; the span itself does of course have child elements, so depending on exactly how you log it in the console you may see the child elements.