.live()
is deprecated. Use .on()
like this. And change
event should be triggered, not click
$('.change_main_image').on('click', function() {
$('input[name=photo].change_uploader').trigger('change', [{somedata:true}]);
});
$('input[name=photo].change_uploader').on('change', function (e, data) {
alert(data.somedata);
//canvas resize and upload script
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…