Ajax replace instead of append
you could empty the element before you append
$("#results").empty().append(myHtml);
or use the html
method
$("#results").html(myHtml)
Just change
$('#results').append(myHtml);
to
$('#results').html(myHtml);
OK, last entry 2009, but if the problem still exist:
let oldElement = $('#results')
let content = '<div id="#results>9000+</div>'
oldElement = oldElement.replaceWith(content)
let newElement = $('#results')