How to Replace Text On Page using jQuery

Today, for one of my requirement, I have to replace all the (.)dots in my page with "---". The basic idea find all the (.) in HTML and replace them with "---". This can be done very easily with jQuery. First you replace the (.) with "---" and assign it to any variable then you need to assign back that value to HTML of the page. See below code.
$(document).ready(function() {
    var strNewString = $('body').html().replace(/\./g,'---');
    $('body').html(strNewString);
});
Instead of, (.) or "---", text can be anything. All you need is to make change in the replace function arguments and you are good to go.
See live Demo and Code.
Feel free to contact me for any help related to jQuery, I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..