I am facing a problem where $('element').html('<p>Some HTML</p>');
is not working properly. After executing $('element').remove();
function the $('element').html();
is working fine.
Example Code below:
<div id="someId"><p>Html before</p></div>
//html() Not working
$('#someId').html("<h1>Some changed Html</h1>");
$('#someId').remove();
//After remove() the html() also works
$('#someId').html("<h1>Some changed Html</h1>");