I want to get the value of span which coming from HTML string. The sample code link- http://jsfiddle.net/9cCHy/58/
var mystring = '<div class="table-cell"> <span>test</span> </div> <span id="isbool" style="display:none">True</span></div>';
var after = $('<div/>').html(mystring).find("span[id='isbool']").contents().unwrap().end().end().html();
// want to capture value true without any dependency of html
alert(after);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div/>is absolutely fine. This is a simple tag for jquery to create a div element. Same way you can create other elements too like<span/>, <table/>etc.