Forums Forums Search & Filter Pro Use Ajax Load in horizontal layout

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #252574

    Hello,
    is it possible to use the Ajax Load in a horizontal layout? Vertical scrolling is disabled on the website.

    Very great plugin!

    Greetings Christoph

    Anonymous
    #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?

    Trevor
    #252599

    I am not sure why you would want to do this, and any change you make to our core files would get over-written on updates, but I have referred this to our plugin developer, Ross, for his input.

    Ross Moderator
    #252609

    Hi 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

    Anonymous
    #252886

    Hi Ross,
    thank you for your quick answer! It was not possible to set the scrolling to horizontal. Do you have a way to solve the problem? My skills are not enough to edit the code.

    Thank you and all the best.

    Christoph

    Ross Moderator
    #253014

    Hi 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

Viewing 6 posts - 1 through 6 (of 6 total)