Wednesday, 15 February 2012

javascript - Infinite scroll return multiple results in IE -


I have created a simple borderless scrolling for my website that shows more image when scrolling down. It works with chrome, but when I test it on Internet Explorer, loader shows results many times. I do not know where this error is.

Here is my jQuery code:

  $ (document) .ready (function (e) {$ (document). Scroll (function () {if ($ (window) .scrollTop () + $ (window) .height () == $ (document) .height ()) {var pictureCount = $ ("Picture-1A"). Length; $ .get ('ajax / home-pagination.php', {off_set: pictureCount}, function (data) {$ ("# home content"). Append (data);})}}})}} ;  

I send off_set to the php page which will return the data with new pictures and add it at the end of the page


No comments:

Post a Comment