Sha256: 6af05582a27dfcd6d3f3db632ec3df4f92f3047124d09190e0af817fea0233fd
Contents?: true
Size: 688 Bytes
Versions: 1
Compression:
Stored size: 688 Bytes
Contents
$(function() { function nearBottomOfPage() { return $(window).scrollTop() > $(document).height() - $(window).height() - 200; } $(window).scroll(function(){ if ($('.spaghetti').data('spaghetti-enabled') == 1) { if(nearBottomOfPage()) { $('.spaghetti').data('spaghetti-enabled', 0); $('.spaghetti').addClass('spaghetti-loading'); $.ajax({ url: $('.spaghetti').data('spaghetti-url') + '?page=' + $('.spaghetti').data('spaghetti-next-page'), type: 'get', dataType: 'script', success: function() { $(window).sausage('draw'); } }); } } }); $(window).sausage(); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spaghetti-0.2.6 | vendor/assets/javascripts/spaghetti/init.js |