public
Last active

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Some ideas for unobtrusive ajax pagination.
 
HTML Markup...
 
<div class="pagination_container">
<div class="pagination>
<a href="...">1</a>...
</div>
<div class="pagination_target">
<p>Blah, blah</p>
...
</div>
</div>
 
 
jQuery Behavior
 
$(".pagination_container .pagination a").live("click", function(click_event) {
click_event.preventDefault();
var target = $(this).closest(".pagination_container").find(".pagination_target");
var href = $(this).attr("href");
target.load(href);
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.