How to remove spaces after a certain element? I have this code.\[code\]</table>" "\[/code\]The   are variable. I'm trying this.\[code\]$("table").each(function() { var text = $(this).children(); text = text.replace('" "', ""); $(this).text(text);});\[/code\]