<div class="spisok">
the <ul>
the <li>
<label for="value-1">
<span><input type="checkbox" class="checkbox" id="value-1" value="1"></span>
<span>option 1</span>
</label>
</li>
the <li>
<label for="value-2">
<span><input type="checkbox" class="checkbox" id="value-2" value="2"></span>
<span>option 2</span>
</label>
</li>
the <li>
<label for="value-3">
<span><input type="checkbox" class="checkbox" id="value-3" value="3"></span>
<span>option 3</span>
</label>
</li>
</ul>
</div>
<div class="vybrano">
here should be noted the values of the checkboxes
</div>
$('.checkbox').click(function(){
var el = $(this);
if(el.prop('checked')){
$('.vybrano').append('<div class="added" value="'+el.val()+'">'+ el.val()+'-remove</div>');
}
else{
$('[value="'+ el.val()+ '"]').remove();
}
});
$('body').on ('click' , '.added' , function(){
var el = $(this);
var id = '#value-' + el.attr('valu');
el.remove();
$(id).prop('checked' , false);
});
Find more questions by tags jQuery