标签:
$(‘div‘).on(‘click‘, ‘button‘, function(e){console.log($(e.target).is(‘:button‘))}); $(‘<button>After</button>‘).insertAfter(‘button‘);
这样貌似更elegant~
给Jquery动态添加的元素添加事件2
原文地址:http://www.cnblogs.com/voctrals/p/4203244.html