I have appended checkboxes on a button click it works fine but after appending removing those by another button click is not at all working.I need someone to checkout and help.
$(".btn").on('click', function(){
    $('#Locations').append('<div id="mydiv">' +
                       '<input type="button" value="-" class="rmvbtn">' +
                       '<input type="checkbox" name="myCheckbox" />' +
    $(".txt").val() +
     "</br>............</br>" +
     '</div>');
});
$(".rmvbtn").click(function(){
    $('#mydiv').remove();
}); 
     
    