Can someone help on why this is only replacing the '[m]' in the first LI? The rest of them stay as '[m]'
aData[2] = "<li>1[m]</li><li>2[m]</li><li>3[m]</li>"
$.html( aData[2].replace('[m]','[media]') )
Use a regular expression and make it global:
$.html( aData[2].replace(/\[m\]/g,'[media]') )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With