I have several tags in my page that look like this:
<em class="itemx item### itemy"> text </em>
where "#" are dynamic numbers.
I want to change it to
<em class="itemx item### itemy itemz"> text </em>
I've tried the following, but to no avail:
$(".itemx item### itemy").replaceWith("<em class='itemx item### itemy itemz'>" + $(".itemx item### itemy").text() + "</em>");
Can anyone tell me what I'm doing wrong? Or is there a better way?
Cheers.