0
0
Read Time:27 Second
[vc_row][vc_column][vc_column_text]
var ajaxQueue = jQuery({});
jQuery.ajaxQueue = function(ajaxOpts) {
var oldComplete = ajaxOpts.complete;
ajaxQueue.queue(function(next) {
ajaxOpts.complete = function() {
if (oldComplete) oldComplete.apply(this, arguments); next(); };
jQuery.ajax(ajaxOpts);
});
};
$("a.actualizar").each(function(idx) {
var cat = $(this).data('val');
if (cat != "") {
jQuery.ajaxQueue({
type: "GET",
url: "/wp-admin/admin-ajax.php?action=actualizarStockIntcomex&p=29UoVEs9oqYWtYvsdK&category="+cat,
success: function (response) {
console.log(response);
$('#respuesta-'+cat).html(response);
$('#proceso-'+cat).html('Enviado');
}
});
}
});
[/vc_column_text][/vc_column][/vc_row]