Paging with jQuery
- by zurna
I get data from another page using jQuery get method. But I have a small problem. Sometimes, data that I take from another page is too long so it's divided into pages. When the user clicks on 1, 2, 3, ... links he/she is redirected to the other page. However, I want data to be reloaded on the same page.
Edit
$('ul.thumbs li.pagination a').live('click', function() {
var pageNumber = parseInt($(this).text().replace(/[^0-9]/g, ''));
$.ajax({
type: "GET",
url: "images.cs.asp?Process=ViewImages&PAGEID=<%=Request.QueryString("PAGEID")%>",
success: function(data) {
$("#ViewImages").html(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
$("#ViewImages").html('.');
}
});
return false;
});