<th colspan="4"><span id="cg1">Item Details</span></th><script>...$('#cg1').html(...); // modify the content...</script>