jQuery如何获取动态添加的元素

在一个页面中, 动态添加一些inpu 后, 通过一般的原有方法$('.month-calculate') 无法取到元素, 但是在Firebug的控制台中是可以取到的..

<input type="number" value="" placeholder="0.00" class="month-calculate" name="detail[6][4]" data-month="4" data-sale="6" style=" 100px;">

如: 

$('.month-calculate').change(function(){
  console.info('yes');
});

$('.month-calculate').bind('change',function () {
  console.info('yes');
});

都不起作用. 而 $('.xxx').live方法在 jQuery 1.9后被取消.

只能用以下方法了:

$('.tableBlock').on('change','.month-calculate',function () { 
	console.info('yes'); 
});

注意: .tableBlock 是 .month-calculate的父元素.

参考: http://phpstudy.net/b.php/59423.html