Add action on glossary term in the page

This commit is contained in:
Samy Pessé
2014-08-19 15:40:37 -07:00
parent d0a14dcbcc
commit 511dc9f805
7 changed files with 85 additions and 9 deletions
+7 -3
View File
@@ -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");
};