$("elementsSelector").replaceWith( "New content" );
$('#id1 p').each(function() { var text = $(this).text(); $(this).text(text.replace('Kate', 'Nef')); });
$(".text_div").text(function () { return $(this).text().replace("contains", "hello everyone"); });