If i have
<p>someword here</p>
<span>another thing here</span>new line
this is as a string
How do i get the content of span?
I want the result to be
another thing here
new line
update :
<script>
var string = "<span>this is span</span>new line";
var anchors = $('<div/>').append(string).find('span').text();
console.log(anchors);
</script>
output:-
this is span
and want to new line