I’m trying to use jQuery (1.7.1) to simply change some rendered text on a page. The text I want to change is “I Like It” to “Tag This”. I have managed to do this for the text, but not for the tooltip etc. I only want the change to occur in the correct container (not page wide). I’m new to jQuery, so I’m probably doing this completely the wrong way and over-complicating! 🙂
I have created a jsfiddle of what I have done so far here, incouding the source HTML:
http://jsfiddle.net/44rMF/
Here is my attempt that changes the text, but obviously not the tooltip etc:
$(document).ready(function () {
$('.ms-socialNotif-text').each(function () {
var text = $(this).text();
$(this).text(text.replace('I Like It', 'Tag This'));
});
});
For tooltips, you have to replace the value of the title attribute, like this: