Answer the question
In order to leave comments, you need to log in
Why is the pjax container not reloading?
This is how I try to update pjax
$(document).on('click', '.card.card-product .footer .add-product', function () {
var obj = $(this);
var id = obj.data('id');
obj.attr("disabled", true);
$.ajax({
method: "POST",
url: "add",
cache: false,
data: {id: id, count: 1},
success: function (data) {
$.pjax.reload({container: "#pjax-basket-panel", timeout: false});
$.pjax.reload({container: "#pjax-product-panel", timeout: false});
toggleButton(obj);
obj.attr("disabled", false);
},
error: function (data) {},
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question