JQUERY Remplacer l'élément
$("elementsSelector").replaceWith( "<h2>New content</h2>" );
Helpless Hamster
$("elementsSelector").replaceWith( "<h2>New content</h2>" );
$(".text_div").text(function () {
return $(this).text().replace("contains", "hello everyone");
});
$('#id1 p').each(function() {
// get element text
var text = $(this).text();
// modify text
text = text.replace('dog', 'doll');
// update element text
$(this).text(text);
});