JS or jQuery event when page loaded from cache?

Viewed 72

I'm using the 'pjax:complete' event on my paginated shop page to update selects and their options. And it works fine, but when user clicks the back button in their browser the page is loaded from cache and 'pjax:complete' doesn't work.

To which event can I add functions for starting them after the page is loaded from cache?

This is not working:

$(document).on('pjax:complete', function () {
    // code here...
});
0 Answers
Related