[Fiddle][1]Fiddle
Add an additional condition after your fetch ID,
if ($(this).is(':checked')) { var id_attr_val = $(this).attr("id"); if(!$('#addtoordersdiv'+id_attr_val).length){ //append code } .length returns 0 if element does not exists.
Alternative to !$(elem).length you can also use $(elem).length === 0 [1]: http://jsfiddle.net/e56TY/41/