クラスのリンクappend
html入力チェックボックスをクリックした後、入力チェックボックスをクリックしてアラートを取得した後is checked
。
次のコードを試しましたが、うまくいきません:
デモ: http://jsfiddle.net/HsveE/
HTML
<a href="#" id="ho">Click Me</a>
<div class="hi"></div>
jQuery
$('#ho').on('click', function(e){
e.preventDefault();
$('.hi').append('<input type="checkbox" id="isAgeSelected"/>');
})
$(".hi input[type=checkbox]").on('click',function () {
alert('is checked')
})
どうすれば修正できますか?