目前,需要在按钮上单击两次" .radioButton"在ajax成功函数中加载两个页面。如何更改我的代码只需单击一下即可加载这两个页面?
$('.select-address').on('click', '.radioButton', function() {
var form = $('#shippingAddress');
var action = form.attr('action'),
method = form.attr('method'),
data = form.serialize();
data += '&' + form.find('button[name$=save]:first')[0].name + '=' + form.find('button[name$=save]:first').val();
$.ajax({
url: action,
type: method,
data: data,
success: function(data) {
$(".mini-billing-address").load(app.urls.miniBillingAddressURL).delay(2000);
$(".billing").load(app.urls.paymentMethodURL).delay(2000);
}
});
});