Jquery live is calling in order to duplicate buttons. However this code doesnt give me expected output. Can someone help me to understand what's the wrong here. Im using Jquery version 1.10.2
//HTML
<body>
<input class="duplicate" type="button" value="Click" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/ext.js"></script>
</body>
//JQuery
$(document).ready(function(){
$('.duplicate').live({
click: function(){
alert('you have clicked');
$(this).after('<input class="duplicate" type="button" value="Click"/>');
}
});
});