Created
October 22, 2013 00:02
-
-
Save jeffjohnson9046/7093046 to your computer and use it in GitHub Desktop.
How to "ajaxify" the control that will_paginate generates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "Ajaxify" the will_paginate control. | |
$(".pagination a").live("click", function() { | |
$(".pagination").html("Loading..."); | |
$.getScript(this.href); | |
return false; | |
}); | |
// For reference, here's what the html in the Rails view looks like: | |
// <div class="pagination pagination-centered"> | |
// <%= will_paginate %> | |
// </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment