issues with infinite scroll
-
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"){...
- The topic ‘issues with infinite scroll’ is closed to new replies.