Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author smashballoon

    (@smashballoon)

    Hey Lance,

    Sorry for the delay getting back to you, my wife just gave birth to our first baby on Saturday and so I’ve been a little preoccupied!

    The plugin doesn’t contain an auto-scroll feature at the moment, but if you’re handy with JavaScript then you may be able to achieve this by combining the jQuery scroll event with the jQuery trigger function, so that as you scroll down the page then it triggers a click on the ‘Load More’ button. It’s beyond the scope of our customer support to build this custom feature for you, but I’ve put something together below which should get you started. If you’re not comfortable with code then it might be a good idea to hire a developer to help you to implement this on your site based on your requirements.

    Try adding the following to the plugin’s Custom JavaScript section and see whether it gets you going in the right direction:

    var scrolled = 0;
    jQuery(window).on('scroll', function() {
        var y_scroll_pos = window.pageYOffset;
        var scroll_pos_test = 500;
        if(y_scroll_pos > scroll_pos_test) {
            scrolled++;
            if(scrolled == 1) jQuery( ".sbi_load_btn" ).trigger( "click" );
        }
    });

    You can adjust the 500 number. This controls how many pixels the user would scroll down the page before more photos are loaded.

    Let me know whether that helps.

    John

    Not OP but want to say thanks, this worked perfect for me.

    Plugin Author smashballoon

    (@smashballoon)

    Awesome, glad to hear that b_dex ??

    John

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto Load without Load More Button’ is closed to new replies.