I append a button which shows an alert but I can't see alert when I click the button. How Can I fix this?
<!doctype html>
<html>
<head>
<title>test</title>
<meta charset="UTF-8">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function() {
$("#myButton").on('click', function() {
$("<h1>Hello</h1><input id=\"but\" type=\"button\">Click").appendTo("#main_body");
});
$( "#but" ).on( "click", function() {
alert( "bla bla" );
});
});
</script>
</head>
<body id="main_body">
<input type="button" value="Tıkla" id="myButton" />
</body>
</html>