I have a simple form that has a button which has the task of creating an input box and button. When the generated button is clicked it should fire an event, to get the value for the generated text box. For some reason, when the button is clicked, jquery doesn't pick up on it, below is my code. Thanks.
<button id="btnclick" type="button" value="click">Click</button>
<script>
$('#btnsend').on('click', function(){
alert("hi");
});
$('#btnclick').on('click', function(){
$('#klappt').append('<span>Please enter the test email</span>');
$('#klappt').append('<input id="inputemail" type="input"></input>');
$('#klappt').append('<button id="btnsend" type="button">Send</button>')
$('#btnclick').remove();
});
</script>