hello all currently i am using infinite scroll
which just appends the data of the next page but it dosent shows the current page no
.
i want something which can show me the current page no in url .
if i am not very clear to you, you can check this site and see that in action when you scroll the page no changes dynamically.
currently i am using code like : if any one just give an idea please ....
and yes i am using php.
here is my javascript
$(document).ready(function(){
var page = 1;
var height=$("#forheight").height(); // 100% of window height
$(window).scroll(function () {
if($(window).scrollTop() + height == $(document).height()) {
document.getElementById('infiscroll').style.display="block";
page++;
var data = {
requested_page: page
};
var actual_count = "<?php echo $totaladds; ?>";
if((page-1)* 10 > actual_count){
$("#showmore").fadeOut();
document.getElementById('infiscroll').style.display="none";
}
else
{
$("#showmore").fadeIn();
$.ajax({
type: "POST",
url: "scrolladds.php",
data:data,
success: function(res) {
$("#mainofad").append(res);
document.getElementById('infiscroll').style.display="none";
}
});
}
}
});
});