jquery ajax添加元素事件无效,each,on函数参考

//页面离开时候发生
$(function(){
$(window).on('beforeunload',function(){//on是打开,
return '离开页面后你的订单不将保存,确定离开吗?';
});
});

//添加,没数据的时候
$('.add_cart_list').on('click','.no_add>a',function () {
$('.dell').hide();
$('.add_cart_list').hide();
})

//each
$(".cart_select>input").each(function(i,e)
{
id[i] = $(e).val();
});
posted @ 2017-08-16 12:01  无限REIZ  阅读(435)  评论(0编辑  收藏  举报