Replace all Text occurance with Jquery
HTML
<div class="text">BROCHURECENTRE</div>
JavaScript
/* Replace all Text occurance with Jquery */
$(function () {
var match = 'BROCHURECENTRE';
var re = new RegExp(match, "g");
$("div.text:contains(" + match + ")").each(function () {
var $this = $(this);
$this.html(function () {
return $this.html().replace(re, "CENTRE");
});
});
});