I'm trying to add pagination. I use
$(document).ready(function() {
var pageNum = 1;
$(".paginationing").click(function(){
pageNum = $(this).attr("id");
});
setInterval("ajaxd("+pageNum+")",5000);
});
function ajaxd(pageNum) {
var thisuser = $("#thisusern").text();
$.ajax({
type: "GET",
url: "newstitle.php",
data: "user="+thisuser+"&page="+pageNum,
success: function(msg){
$("#edix").html(msg);
}
});
}
To send the page number.But it sends only page number 1 ,even I click on the page number. Where's the bug?How can I implement AJAX pagination with setInterval to call the page every 5 seconds?