Is there a way to remove text that is not wrapped in any tag using jQuery
This is some text This is \"unwrapped\" text //to be removed &
This is some text
Wrapping it in a DOM element would mean jQuery can find it:
eg:
var text = 'This is "unwrapped" text'; $("div:contains('" + text + "')").remove();
or just:
$('p').next().remove();