Endless scroll paging in jquery Safari
- by socheata
I'm using :
$(window).scroll(function () {
if ($(window).scrollTop() + 10 >= ($(document).height() - $(window).height())) {
loadContent();
}
}
It works fine with Chrome, IE, Firefox but except in Safari. In function loadContent, I used JSON to load data, as this tutorial. But while I test in Safari, It takes the content twice from JSON. If the other takes 9 items, then Safari takes 18 items.
Does anyone know how to solve this problem?
Thanks.