Whenever I utilize the bootstrap modal and pagination for modal content, clicking the next/prev button causes the entire page, including the main window, to reload.
Here are the scripting lines:
$("#ajax_process_page").html("<%= escape_javascript(render('/modal_file')) %>");
$(document).ready(function() {
$(document).on("click", ".pagination a", function() {
$(".pagination").html("<img src='/images/feed-loader.gif' align='middle' />");
$.getScript(this.href);
});
});
Here is the HTML code:
<div id="ajax_process_page">
<% render "/modal_file" %>
</div>