jquery replace text in div

JavaScript
$('#id1 p').each(function() {
    var text = $(this).text();
    $(this).text(text.replace('Kate', 'Nef')); 
});$('#one span').text('Hi I am replace');
Source

Also in JavaScript: