looping over appended elements with Array.prototype.forEach