SyntaxFix
Write A Post
Hire A Developer
Questions
$('div').html('');
But why are you clearing, divToUpdate.html(data); will completely replace the old HTML.
divToUpdate.html(data);