this is the code I have, I want to increment the value of the variable sfrom everytime the function is called, the function is triggered when someone scrolls to the bottom of the page.
any idea please ?
<script type="text/javascript">
if (typeof sfrom=="undefined") {
var sfrom = 0;}
$(function(){
$('.tainer').scrollPagination(
{
'contentPage': 'listitem.php',
'contentData': {startfrom:sfrom},
'scrollTarget': $(window),
'heightOffset': 5,
'beforeLoad': function(){
},
'afterLoad': function(elementsLoaded){
var i = 0;
$(elementsLoaded).fadeInWithDelay();
}
});
});