Added pagination scrolling fix for issue 136
authorwilliam-bratches <williambratches@gmail.com>
Sat, 22 Mar 2014 00:27:30 +0000 (20:27 -0400)
committerwilliam-bratches <williambratches@gmail.com>
Sat, 22 Mar 2014 00:27:30 +0000 (20:27 -0400)
karmaworld/templates/courses/course_list.html

index 8ae1ab97eaf786bd87d28e2e27abccbccddc9cd1..a874f63fee3f7d6024d60483536a6f17e48eddb7 100644 (file)
@@ -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();;
+    });
+
+
 </script>
 {% endblock %}