From: william-bratches Date: Sat, 22 Mar 2014 00:27:30 +0000 (-0400) Subject: Added pagination scrolling fix for issue 136 X-Git-Tag: release-20150131~144^2~12^2~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=97aae20715f1336e2b6bf754b14b1b833b155bf6;p=oweals%2Fkarmaworld.git Added pagination scrolling fix for issue 136 --- 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 %}