how to replace an element in jquery code example
Example 1: jquery replace element
$("elementsSelector").replaceWith( "<h2>New content</h2>" );
Example 2: jquery replace text in div
$('#one span').text('Hi I am replace');
$("elementsSelector").replaceWith( "<h2>New content</h2>" );
$('#one span').text('Hi I am replace');