diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-14 15:43:11 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-14 15:43:11 +0200 |
commit | 1ff7e88cea6b33cb403ce9cc0450a0a326fb1998 (patch) | |
tree | 6809928f83c38f733de678c822d2a1a5876dd7c3 /theme/javascript | |
parent | c3ba975d6c25c599f197698234f94c8e99e40ff1 (diff) | |
download | gitbook-1ff7e88cea6b33cb403ce9cc0450a0a326fb1998.zip gitbook-1ff7e88cea6b33cb403ce9cc0450a0a326fb1998.tar.gz gitbook-1ff7e88cea6b33cb403ce9cc0450a0a326fb1998.tar.bz2 |
Focs and reset scroll on page body
Diffstat (limited to 'theme/javascript')
-rwxr-xr-x | theme/javascript/app.js | 3 | ||||
-rwxr-xr-x | theme/javascript/core/navigation.js | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/theme/javascript/app.js b/theme/javascript/app.js index 53d8196..6cf4120 100755 --- a/theme/javascript/app.js +++ b/theme/javascript/app.js @@ -40,8 +40,5 @@ require([ // Init navigation navigation.init(); - - // Focus on content - $(".book-body").focus(); }); });
\ No newline at end of file diff --git a/theme/javascript/core/navigation.js b/theme/javascript/core/navigation.js index 747bd03..6e775cf 100755 --- a/theme/javascript/core/navigation.js +++ b/theme/javascript/core/navigation.js @@ -42,6 +42,12 @@ define([ // Show progress progress.show(); + + // Reset scroll + $(".book-body").scrollTop(0); + + // Focus on content + $(".book-body").focus(); }; var handlePagination = function (e) { |