I'm playing around with pagination and jQuery, my code first looked like this:
$(function() {
$(".pagination a").live("click", function() {
$.get(this.href, null, null, "script");
return false;
});
});
Then I noticed that live
was removed in jQuery 1.9 so I changed my code to:
$(function() {
$(".pagination").on("click", 'a', function() {
$.get(this.href, null, null, "script");
return false;
});
});
But somehow this also won't work! The problem is that I can navigate from the first ajax page to the second but then form the second back to the first page or to the third page my ajax is not working. I supose because my code does not regognice the new added .pagination a
.