-
-
Notifications
You must be signed in to change notification settings - Fork 342
Description
Firstly - awesome plugin! Loving it. Its the 3rd infinite scroll plugin I have tried and this is by far the best.
There is possibly one minor issues and easy fix that I have found when using with pjax.
Am using via an extension in the yii2 php framework and filtering/sorting is handled automatically for me. With pjax enabled after sorting.filtering multiple spinner wheels appear when scrolling.
I have fixed for myself easily by adding:
$(document).on('pjax:beforeReplace', function() {
$.ias().destroy();
});
$(document).on('pjax:end', function() {
$.ias().reinitialize();
});
however I suspect the cause to be after filtering that a re-initialising of the IAS object probably occurs and is probably chaining another scroll event on top of the existing one.
A fix within this plugin might be to unbind ias events prior to binding so that this couldn't occur?
Note also that I had thought that reinitialize alone would have done the job but suspect the events are left attached.
Cheers