Enable anchor.min.js in Zeppelin docs site

This commit is contained in:
AhyoungRyu 2016-06-10 16:37:42 -07:00
parent 94b38cda4f
commit 475d0d8408
2 changed files with 8 additions and 2 deletions

View file

@ -32,6 +32,7 @@
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="{{ ASSET_PATH }}/bootstrap/js/bootstrap.min.js"></script>
<script src="{{ ASSET_PATH }}/js/docs.js"></script>
<script src="{{ ASSET_PATH }}/js/anchor.min.js"></script>
<!-- atom & rss feed -->
<link href="{{ BASE_PATH }}{{ site.JB.atom_path }}" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed">

View file

@ -107,7 +107,12 @@ function maybeScrollToHash() {
$(function() {
codeTabs();
viewSolution();
// Display anchor links when hovering over headers. For documentation of the
// configuration options, see the AnchorJS documentation.
anchors.options = {
placement: 'right'
};
anchors.add();
$(window).bind('hashchange', function() {
maybeScrollToHash();
@ -115,5 +120,5 @@ $(function() {
// Scroll now too in case we had opened the page on a hash, but wait a bit because some browsers
// will try to do *their* initial scroll after running the onReady handler.
$(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); });
$(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); });
});