modified: s/index.tpl.html

This commit is contained in:
Flummi 2016-09-02 08:52:07 +00:00
parent 8807934fcd
commit 5169cf12bd

View File

@ -16,13 +16,13 @@
</div>
<script src="./s/jquery-3.1.0.min.js"></script>
<script>
var scrollListener = function () {
$(window).one("scroll", function () {
var scrollListener = () => {
$(window).one("scroll", () => {
if($(window).scrollTop() + 256 >= $(document).height() - $(window).height()) {
$.ajax({
url: './api/p/'+$('#posts').data('last'),
dataType: 'json',
success: function(msg) {
success: (msg) => {
var html = "";
for(var i = 0; i < msg.items.length; i++)
if(msg.items[i].id)
@ -35,7 +35,7 @@
setTimeout(scrollListener, 200);
});
};
$(document).ready(function () {
$(document).ready(() => {
scrollListener();
});
</script>