fredwu / jquery-endless-scroll

Endless/infinite scrolling/pagination.
http://fredwu.github.com/jquery-endless-scroll/
837 stars 176 forks source link

Extra space added to page in IE8, scroll fires immediately #32

Closed ghost closed 11 years ago

ghost commented 11 years ago

When testing my page in IE8 the first time I start scrolling the endless scroll fires immediately. It loads the next iteration, but it also adds a large whitespace above the container I am appending content to. Here is a sample: $(window).endlessScroll({ loader: "", fireOnce: true, bottomPixels: 130, callback: function (p) { if ($("#stopEndlessScroll").val() == "true") return; var department = $(".deptFilter a.active").attr("data-id"); var letter = $("#nameFilter .active").text(); var sort = letter != ""; $.get("/marketplace/GetMoreShopMerchants", { iteration: p, department: department, nameFilter: letter, sort: sort }, function (data) { $("#stopEndlessScroll").val(parseInt(data.resultcount) < 20); $(".featured-item-container").append(data.resultstring); }); }, resetCounter: function () { return $("#resetCounter").val() == "true"; } });

Any input would be appreciated

Thanks