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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -