jQuery: Replace $ (currency symbol) to another currency symbol
-
21-09-2019 - |
Question
Im looking for function that will allow me to replace all dollar symbols within a div to "CHF" (another currency). The reason is that the currency symbol is hardcoded and it should be replaced.
Is there a simple way of doing this?
Many thanks in advance.
Solution
jQuery('div').each(function(i){ jQuery(this).text(jQuery(this).text().replace('$','CHF')) })
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow