Closed pottrell closed 10 years ago
That's generally the idea with dynamic, paginated content, so yes. Your backend will have to handle the serving of that data via asynchronous http request for jScroll to display the content on the page.
My apologies, I'm very new to this really!
So I would do something along the lines of:
<script type="text/javascript">
$(document).ready(function(){
$(".more").live('click',function(){
$.ajax({
type : "POST",
url : "loadmore.php",
beforeSend : function(){
var exhtml = $('#more').html();
$('.more').html('<img src="loader.gif" alt="Loading..." />');
},
success : function(html){
$('.more').remove();
$('#records').append(html);
}
});
});
});
</script>
load.php would have my php request?
Is it possible to use jScroll with data from a database?