Forum Moderators: open
<div class="scroll">
<div id="itemList">
...
</div>
<a href="$next_link" class="next" style="display: none">next</a>
</div>
<script>
$('.scroll').jscroll({
padding: 100,
nextSelector: 'a.next:last',
contentSelector: '#itemList'
});
</script> echo <<<EOF
<div class="scroll">
<div id="itemList">
EOF;
// Define Page
if (is_numeric($_GET['s'])) $start = $_GET['s'];
else $start = 0;
$end = $start + 25;
for ($i = $start; $i < $end; $i++) {
// do whatever
}
$next_link = $home . '?s=$end';
echo <<<EOF
</div>
<a href="$next_link" class="next" style="display: none">next</a>
</div>
<script>
$('.scroll').jscroll({
padding: 100,
nextSelector: 'a.next:last',
contentSelector: '#itemList'
});
</script>
EOF; // Including this for posterity
<script src="//cdn.jsdelivr.net/jquery.jscroll/2.2.4/jquery.jscroll.min.js"></script>
<div class="scroll">
<div id="itemList">
...
<div class="next"><a href="$next_link">next</a></div>
</div>
</div>
<script>
$('.scroll').jscroll({
padding: 100,
nextSelector: '.next > a:last',
contentSelector: '#itemList'
});
</script>