Let's say I have an array like this:
var content = [ $('<p>...</p>'), $('<p>...</p>') ];
I need to get the markup of the concatenated elements. So I need to convert content
" into a raw string: "<p>...</p><p>...</p>
".
How can this easily be done? Seems like there should already be something in the framework to do this.
Somehow maybe convert content
into a document fragment and call .html()
on the document fragment to get the markup?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With