Forums › Forums › Search & Filter Pro › Ajax load on overlay hidden container
- This topic has 6 replies, 3 voices, and was last updated 5 years, 6 months ago by
Trevor.
-
Anonymous(Private) October 16, 2019 at 4:52 pm #223820
Hi,
We have the pro plugin, and works ok, but the filter show the results on a div with overlay hidden, and the ajax load more on scroll not work so well because the distance is based on all the page height. Can you give me a clue to load more results on scroll to end of the container div please?Thanks a lot.
Ross Moderator(Private) October 18, 2019 at 2:20 pm #224105Hi Alejandro
I can think of a way to do this.
Search & Filter works off the window scroll event, so when the bottom of the results container is at a certain point in relation to the window, we fetch more results.
However, I just did a little test and it seems by triggering the scroll event manually, S&F seems to play well in your scenario.
What you need to do is something like this:
1) On container scroll
2) Trigger the window scroll eventSo in JavaScript it would be:
jQuery('#results_column').on("scroll", function(){ jQuery(window).trigger("scroll"); });
I tested this in your site (by pasting it into the JS console) and it seems to work ok.
Thanks
-
AuthorPosts