I have following code in my html
<p>6565655655|cell</p>
I want to remove this vertical line and wrap word “cell” into round bracket. So I want output like below
<p>6565655655 (cell)</p>
How I can do it using jquery when content of p tag loading dynamically by ajax call.
Split the content of the p-tag with the pipe as delimiter and re-insert the so created array, second element with surrounding bracket.
Here an example:
jsFiddle: http://jsfiddle.net/r3c4J/