3 ms·
Personally, instead of $('#id').replaceWith('<div>I have been replaced</div>'); I prefer $('#id').replaceWith($('<div/>').text('I have been replaced.'));
by mshafrir 17y ago
Personally, instead of
$('#id').replaceWith('<div>I have been replaced</div>');
I prefer
$('#id').replaceWith($('<div/>').text('I have been replaced.'));