i just want to know how to reload multiple pjax? this is my code
$.pjax.reload({container:"#con_camp"});
$.pjax.reload({container:"#con_camp1"});
but only the #con_camp1 is the one that will reload.
Unfortunately Pjax by design doesn't allow multiple requests. In order to do those you have to nullify xhr
parameter in $.pjax
.
Basically like this:
$.pjax.reload({container:"#con_camp"});
$.pjax.xhr = null;
$.pjax.reload({container:"#con_camp1"});
$.pjax.xhr = null; // so that some next pjax request wont cancel this reload.
You could just do
$.pjax.reload({container: '#container_1'}).done(function () {
$.pjax.reload({container: '#container_2'});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With