X
Publisher: Sigit purnomo kangsigit.com@gmail.com

How to Change All Text Specified in Post with jQuery

Copy this code into your site template.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function replaceText(){
         var mytxt = $("body").html();
var newtxt = /hello/gi;
         var newText = mytxt.replace(newtxt, "Hello.");
$("body").html(newText)
};
$(document).ready(function(){
$(replaceText);
});
</script>
This trick can be used for blogspot users of blogger, wordpress and other hosting You can change the writing is blue with anything you need
Posts other than what you put in the javascript will not change at all.

Advertisement

no image
Add Comments
0 Comments
Click Here to Add Comments

No Comment