You are here:
» Jquery Search And Replace
Jquery search and replace
This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
Hi Guys,
I need a jquery code where I need to search for an element and then replace every period (\.) with the text "[this is period]". How can I do this jquery search and replace?

1 year 40 weeks ago
Tags:
You need to use Jquery replace() API function:
Jquery replace() takes first argument as the regular expression. So, the code below means that we are trying to replace all (/g) occurrence of text in #container with the text.
Therefore, the complete JQuery code looks like this:
This would give output:
Really Awesome and Thanks
Post Comment