I have a few keywords within a paragraph of text that need to be replaced by inline html dynamically. What would be the best way to go about this, using jQuery?
e.g.:
<p>
Lorem :XXXX: dolor sit amet,
consetetur :YYYY: elitr.
</p>
should end up like:
<p>
Lorem <span class="XXXX"></span> dolor sit amet,
consetetur <span class="YYYY"></span> elitr.
</p>