Initial HTML output that I get from wordpress:
<div class="testimonial-name">Syed Haroon {{ Web Developer_ India }}</div>
Below given jQuery code will convert {{ to <span> and }} to </span> and _ to ,
jQuery('.testimonial-name').text(function(index,text){
return text.replace("{{",'<span>')
.replace("}}",'</span>')
.replace('_',',');
})
After running the above code the result is:
<div class="testimonial-name">Syed Haroon <span> Web Developer, India </span></div>
What I actually need is:
<div class="testimonial-name">Syed Haroon <span>Web Developer, India</span></div>