js ajax click event after the request data failures

// 初始化数据的时候
$('.shoucang .img-1').click(function(){ // code... }); // ajax加载后click事件不执行,又改成这样 $('.shoucang .img-1').live("click",function(){ // code... });


//jQuery1.9之后由于live被删除了,所以应该这样写:
$(document).on("focus","a",function(){ this.blur(); }); 
 

Guess you like

Origin www.cnblogs.com/huangtaiyi/p/11725139.html