Skip to content

Instantly share code, notes, and snippets.

@ty-shaikh
Last active June 10, 2016 21:25
Show Gist options
  • Save ty-shaikh/3bf15c44ff1136280ccb26bcf3eb5f73 to your computer and use it in GitHub Desktop.
Save ty-shaikh/3bf15c44ff1136280ccb26bcf3eb5f73 to your computer and use it in GitHub Desktop.
Pagination example
//= require paginate
<div id="posts">
<%= render 'posts' %>
</div>
$("#posts").html("<%= escape_javascript(render("posts")) %>");
$(function() {
$(".pagination a").live("click", function() {
$(".pagination").html("Page is loading...");
$.getScript(this.href);
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment