jquery replace part of text with html content -
how can replace part of text html?
<span class="squaremeter">3000m2</span> var content = $(".squaremeter").text().replace(/\[m2\]/g,'m<sub style="font-size:0.5em;">2</sub>') $(".squaremeter").html(content);
the above not work...
Comments
Post a Comment