1$('#id1 p').each(function() {
2 var text = $(this).text();
3 $(this).text(text.replace('Kate', 'Nef'));
4});
1$(yourElement).html("New text");
2//sets yourElement innerHTML to "New text"
3var text = $(yourElement).html();
4//html() returns the text inside yourElement if you pass no parameters