Hi Waqar, Here is a screen recording of what is happening - hidden link
When you are on the 2nd page and select a filter is scrolls right down to the very bottom of the page where the footer is. You then have to scroll back up the page to see the search results. I don't thing this is an issue of waiting for the results to load as this does not happen on the 1st page of the results.
It does the same thing when you are on the 2nd page and there are no filters selected, then you click "Clear filters" it scrolls down to the footer. (I know this one is not necessary to fix as the user doesn't need to clear filters when there are none selected) but just to show you the same "Scroll down" thing happens.
Thank you for sharing the screen recording and I see what you mean.
The view currently has these two custom script snippets:
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated js_event_wpv_pagination_completed', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.layout (object) The jQuery object for the View layout wrapper
*/
jQuery(".wpv-filter-form select").chosen()
});
jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
jQuery('html, body').animate({ scrollTop: 0 }, 'fast');
});
You can replace these with a combined single script snippet, like this:
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated js_event_wpv_pagination_completed', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.layout (object) The jQuery object for the View layout wrapper
*/
jQuery(".wpv-filter-form select").chosen();
jQuery('html, body').animate({ scrollTop: 0 }, 'fast');
});
This should initiate scroll and select field styles, on both events ( search results update and the pagination results update ).
Working perfectly now! Thank you for your help.