Following is my code. After appending buttons in div, the appended buttons click event not working.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<button class='btn-append'>Append Buttons</button><br><br>
<div id='div-buttons'> </div>
<script>
$(document).ready(function(){
$('.btn-append').click(function(){
var content = "<button class='btn'>Button-1</button><br><br><button class='btn'>Button-2</button>";
$('#div-buttons').append(content);
})
});
$(document).ready(function(){
$(".btn").click(function(){
$(this).hide();
});
})
</script>
</body>
</html>