Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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++;    
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #appended #element #jquery
ADD COMMENT
Topic
Name
5+4 =