When transforming html that contains empty span with a outside text to the jQuery object, I loose the text. I can illustrate this with a simple example:
var test = "<span></span> someText";
var jq = $(test);
console.log(jq.prop('outerHTML'));
This will log only span, without someText (lost).
Can you tell me how could I avoid this? Thank you.