<script type="text/javascript"> $(document).ready(function() { function lastPostFunc() { $('#divPostsLoader').html('<img src="images/bigLoader.gif">'); //send a query to server side to present new content $.ajax({ type: "POST", url: "Articles.aspx/ItemsGet", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { if (data != "") { $('.divLoadData:last').after(data.d); } $('#divPostsLoader').empty(); } }) }; //When scroll down, the scroller is at the bottom with the function below and fire the lastPostFunc function $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() - $(window).height()) { lastPostFunc(); } }); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)