im using a jquery plugin for infinite scrolling, and its working perfectly except for the client side scripts that need to run.
my infinite scrolling script is:
<script type="text/javascript">
$('.infinite-container').waypoint('infinite', {
container: 'auto',
items: '.infinite-item',
more: '.infinite-more-link',
offset: 'bottom-in-view',
loadingClass: 'infinite-loading',
onBeforePageLoad: $.noop,
onAfterPageLoad: $.noop
});
</script>
what i think i need to do is somehow call my server side scripts using this:
onAfterPageLoad:
my key issue is that my twitter and facebook buttons arnt loading. all i can see is the word "twitter" and facebook buttons dont show up at all. But on the initial page they load no problem.
i somehow need to load this again:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=***********";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
as well as these:
<script>
$(document).ready(function() {
$('.container').stickem();
});
</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
im pretty new to javascript/jquery so any advice is welcome. thanks.