• Hello Photonic! Your plugin is awesome!

    Is there a way to make the page reload more photos automatically when reaching the bottom of the page?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    No, this is not possible, and is not planned either. Photonic let’s you create multiple galleries in the same page, and such behavior conflicts with this basic design philosophy.

    Thread Starter shilo105

    (@shilo105)

    Thank you For your fast response!

    I was trying to add a custom code

    jQuery(window).on('scroll', function(){
      var s = jQuery(window).scrollTop(),
          d = jQuery(document).height(),
          c = jQuery(window).height();
    
       scrollPercent = Math.floor((s / (d - c)) * 100);
       loadingDisplay = document.getElementsByClassName('photonic-loading')[0].style.display;
        loading = document.getElementsByClassName('photonic-loading')[0];
        if(scrollPercent > 75 && loadingDisplay == 'none'){
            document.getElementsByClassName('photonic-more-button')[0].click(); 
            loading.style.setProperty('z-index', '-1', 'important');
            loading.style.visibility = 'hidden';
        }
        if(scrollPercent > 95 && loadingDisplay == 'block'){
            loading.style.setProperty('z-index', '999999', 'important');
            loading.style.visibility = 'visible';
        }
        function loading_status(){
    	status = 'not loading';
    	if(loadingDisplay == 'block') status = 'loading...';
    	return status;
        } 
    // For testing
    // console.clear();
    // console.log(scrollPercent +'% ' + loading_status());
    });

    Works like a charm!

    • This reply was modified 1 year, 6 months ago by shilo105.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Auto scroll’ is closed to new replies.