summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core/navigation.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-08-19 15:40:37 -0700
committerSamy Pessé <samypesse@gmail.com>2014-08-19 15:40:37 -0700
commit511dc9f805f209e0916ddfba144530fe960fbb28 (patch)
tree7046092b362af205fc61ec177f87eca60d193989 /theme/javascript/core/navigation.js
parentd0a14dcbcc92b43a4f0f4bccfc767931c3af565a (diff)
downloadgitbook-511dc9f805f209e0916ddfba144530fe960fbb28.zip
gitbook-511dc9f805f209e0916ddfba144530fe960fbb28.tar.gz
gitbook-511dc9f805f209e0916ddfba144530fe960fbb28.tar.bz2
Add action on glossary term in the page
Diffstat (limited to 'theme/javascript/core/navigation.js')
-rwxr-xr-xtheme/javascript/core/navigation.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/theme/javascript/core/navigation.js b/theme/javascript/core/navigation.js
index 3749419..f5d03df 100755
--- a/theme/javascript/core/navigation.js
+++ b/theme/javascript/core/navigation.js
@@ -5,8 +5,9 @@ define([
"core/state",
"core/progress",
"core/loading",
- "core/search"
-], function($, URL, events, state, progress, loading, search) {
+ "core/search",
+ "core/glossary"
+], function($, URL, events, state, progress, loading, search, glossary) {
var prev, next;
var usePushState = (typeof history.pushState !== "undefined");
@@ -80,13 +81,16 @@ define([
// Update navigation position
updateNavigationPosition();
+ // Set glossary items
+ glossary.prepare();
+
// Reset scroll
$pageWrapper.scrollTop(0);
// Focus on content
$pageWrapper.focus();
- // Send to mixpanel
+ // Notify
events.trigger("page.change");
};