$(document).ready(function () { $('#blogs_list').DataTable({ language: { search: "", searchPlaceholder: "--- Search Blogs ---" }, "bLengthChange" : false, "bInfo":false, "ordering": false, }); function paginateScroll() { $('html, body').animate({ scrollTop: $(".dataTables_wrapper").offset().top -250 }, 100); console.log('pagination button clicked'); $(".paginate_button").unbind('click', paginateScroll); $(".paginate_button").bind('click', paginateScroll); } });