From 97aae20715f1336e2b6bf754b14b1b833b155bf6 Mon Sep 17 00:00:00 2001 From: william-bratches Date: Fri, 21 Mar 2014 20:27:30 -0400 Subject: [PATCH] Added pagination scrolling fix for issue 136 --- karmaworld/templates/courses/course_list.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/karmaworld/templates/courses/course_list.html b/karmaworld/templates/courses/course_list.html index 8ae1ab9..a874f63 100644 --- a/karmaworld/templates/courses/course_list.html +++ b/karmaworld/templates/courses/course_list.html @@ -75,6 +75,19 @@ $(document).ready(function() { $('.dataTables_filter input').attr("placeholder", "search courses"); // TODO: can't prepend html to .dataTables_filter input html for fontawesome search icon }); + + //scrolling scripts - scrolls to top of page after scrolling between pages + $(function(){ + $('#paginate_enabled_next').click(function() { + $("#data-table-sort-by").ScrollTo();; + }); + + $(function(){ + $('paginate_enabled_previous').click(function() { + $("#data-table-sort-by").ScrollTo();; + }); + + {% endblock %} -- 2.25.1