Forums › Forums › Search & Filter Pro › Use Ajax Load in horizontal layout
Tagged: ajax, horizontal
- This topic has 5 replies, 3 voices, and was last updated 4 years, 5 months ago by Ross.
-
Anonymous(Private) July 13, 2020 at 1:10 pm #252588
if((!self.is_loading_more) && (!self.is_max_paged)) { var window_scroll = $(window).scrollTop(); var window_scroll_bottom = $(window).scrollTop() + $(window).height(); var scroll_offset = parseInt(self.infinite_scroll_trigger_amount);//self.infinite_scroll_trigger_amount; //var $ajax_results_container = jQuery($this.attr("data-ajax-target")); if(self.$infinite_scroll_container.length==1) { var results_scroll_bottom = self.$infinite_scroll_container.offset().top + self.$infinite_scroll_container.height(); //var offset = ($ajax_results_container.offset().top + $ajax_results_container.height()) - window_scroll; var offset = (self.$infinite_scroll_container.offset().top + self.$infinite_scroll_container.height()) - window_scroll; if(window_scroll_bottom > results_scroll_bottom + scroll_offset) { self.loadMoreResults(); } else {//dont load more } } }
Is this the right place to edit?
Ross Moderator(Private) July 13, 2020 at 2:46 pm #252609Hi Christoph
I’ve never actually thought about doing it horizontal, but makes sense if you have horizontal scrolling.
That’s absolutely the right place to edit – I guess you need to change all references of “bottom” to “right” and change “top” to “left” – I think to get the right position you have do do
$ajax_results_container.width() + $ajax_results_container.offset().left
as well as a few other edits.I hope that helps.
Best
Ross Moderator(Private) July 16, 2020 at 8:52 am #253014Hi Christoph
We don’t have the resource to be rewriting this code right now (and testing) – you might have to hire someone to help with that. I’ll mark this for consideration in version 3 (something we’re working on right now) so it might be possible to do in the future.
Sorry I can’t be of any more help right now.
Best
-
AuthorPosts