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); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment