jquery remove append code example
Example 1: remove item jquery
$( ".hello" ).remove();
Example 2: remove appended element jquery
$('#answer').on('click', function() {
feedback('hey there');
});
var counter = 0;
function feedback(message) {
$('#feedback').remove();
$('.answers').append('<div id="feedback">' + message + ' ' + counter + '</div>');
counter++;
}