I’m trying to replace some strings within round brackets. I’m able to replace the round brackets but not the text in it. The text is variable and not always the same, e.g. (9 seats free), (6 seats free) and so on. How can i solve it to replace both, brackets and its content?
$('myclass').children().each(function () {
$(this).html(function (i, html) {
return $(this).html().replace('mytext', '').replace(/(|)/g, "");
});
});
2