• Hi,

    I’m developing a site with your social-gallery-light plugin, it’s a really nice plugin, except that I ran in a problem with infinite scroll.

    All the posts that are being added after the initial page load won’t get the social gallery and will link to the image itself.

    I’ve noted that when reloading js/socialGalleryPluginLite.js will partly solve this issue. Except that it creates another #sgPluginBg, #sgPluginBox etc.

    To fix this, I’ve changed the js file, so it looks if #sgPluginBg is already set, if so, it won’t append #sgPluginBg and #sgPluginBox etc.
    Maybe there is a more elegant fix for this, but it would be cool to intergrate it, so it will be possible to update te plugin.

    I’ve added the following:

    /* piece of your code */
    ...jQuery("#sgPluginBg, #sgPluginBox").css("display","block")}jQuery(document).ready(function(b){
    
    /* my addon */
    if(!jQuery("#sgPluginBg").length){
    
    /* your code */
    jQuery("body").append('<div id="sgPluginBg"></div><div id="sgPluginBox"><div id="sgCont"></div><div id="sgSide"><div id="sgSideWrap"></div></div><div id="sgPluginBoxClose">x</div></div><div id="sgPluginLoader"></div><div id="sgDisqusHold" style="display:none"><div id="disqus_thread"></div></div>');
    
    /* my addon */
    }
    
    /* piece of your code */
    if(window.sgp_config.sgp_bg!=""&&window.sgp_config.sgp_bg!="000000"){...

    https://www.ads-software.com/plugins/social-gallery-lite/

Viewing 1 replies (of 1 total)
  • Plugin Author Mike Stott

    (@mikemayhem3030)

    Hi – sorry for not getting back to you sooner (I don’t appear to be getting notifications of new support tickets on here!)

    You can call socialgallerybind(); to rebind the click events.

    This is in the Social Gallery PRO version

Viewing 1 replies (of 1 total)
  • The topic ‘issues with infinite scroll’ is closed to new replies.