|
Latest effort is to add the following via a Content Editor Web part... and while it works in a simple HTML page, it doesn't work on my SharePoint page...
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script> (function($){ $.fn.replaceText = function(str,restr){ var re = new RegExp("("+str+")",'ig'); return this.each(function(){ $(this).contents().filter(function(){ return this.nodeType != 1; }).each(function(){ var output = $(this).text().replace(re,restr); if (output != $(this).text()) { $(this).wrap("<p></p>").parent('p').html(output).contents().unwrap(); } }); }); } })(jQuery); $(function(){ $('#demo').replaceText("12:00 AM",""); });
</script>
|