expandtheroom/jquery-infinite-scroll-helper

Reset page count

Closed this issue · 4 comments

Hello,

First of all thanks for this great lib.

I have a use case where I retrieve content for a selected tag. All through AJAX. Then a user can endlessly scroll to see all the content for the tag. Then the user can select a different tag and I need to reset the page count (i.e., we need to start from page 0). I tried to destroy and create infinite scroll again but this does not seem to work.

Is there a way of handling this scenario at the moment?

Hello,

Just pushed a fix for the destroy method issue. You should be able to destroy the instance and reinstantiate it now.

Hello,

Thanks a lot for your great plugin! Just a suggestion, I think it would be better to be able to reset the page count without destroying / re-initializing the plugin, the code would be cleaner.

Best regards

Thanks for the feedback. I will consider this in the next update.

@Alplob I see you submitted a pull request. I will take a look. Thanks!