$("elementsSelector").replaceWith( "<h2>New content</h2>" );
$('#dialog_title_span').text("new dialog title");
$(".text_div").text(function () {
return $(this).text().replace("contains", "hello everyone");
});
$('#one span').text('Hi I am replace');