As Felix Kling said - it is because you bind keyup multiple, the fixed code:
if ($('#itemcontainer').html().trim()) {
$('#searchnama').removeAttr('placeholder');
} else {
$('#searchnama').attr('placeholder', 'Item');
}
$('.listcontainer').bind('click', function() {
$('#searchnama').focus();
});
$('#searchnama').keyup(function(e) {
if (e.keyCode == 8 && $(this).val() == '') {
$('#itemcontainer div.detailwrapper:last').remove();
}
if ($('#itemcontainer').html().trim()) {
$('#searchnama').removeAttr('placeholder');
} else {
$('#searchnama').attr('placeholder', 'Item');
}
});
$('.remove').bind('click', function() {
$(this).closest('div.detailwrapper').remove();
});
also you have common design mistake, - you always use absolute selectors, it can cause many confusions on code just little bigger than this one.