forked from felippepuhle/aero-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
js_scrollspy.html
89 lines (77 loc) · 2.42 KB
/
js_scrollspy.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
layout: admin
title: Javascript - Scrollspy
section: js
module: js_scrollspy
header:
icon: fingerprint
title: Scrollspy
description: Scrollspy is a jQuery plugin that tracks certain elements and which element the user's screen is currently centered on. Our main demo of this is our table of contents on every documentation page to the right. Clicking on these links will also scroll the page to that element.
javascripts:
- js/table-of-contents.js
---
<section id="js_scrollspy">
<div class="row">
<div class="col s12 m9 l10">
<!-- ######### -->
<!-- Structure -->
<!-- ######### -->
<div id="structure" class="scrollspy">
<div class="row no-gutter">
<div class="col s12">
<h4 class="main-text lighten-1">Structure</h4>
<pre>
<code class="language-html">
<div class="row">
<div class="col s12 m9 l10">
<div id="introduction" class="section scrollspy">
<p>Content </p>
</div>
<div id="structure" class="section scrollspy">
<p>Content </p>
</div>
<div id="initialization" class="section scrollspy">
<p>Content </p>
</div>
</div>
<div class="col hide-on-small-only m3 l2">
<ul class="section table-of-contents">
<li><a href="#introduction">Introduction</a></li>
<li><a href="#structure">Structure</a></li>
<li><a href="#initialization">Intialization</a></li>
</ul>
</div>
</div>
</code>
</pre>
</div>
</div>
</div>
<!-- ############## -->
<!-- Initialization -->
<!-- ############## -->
<div id="initialization" class="scrollspy">
<div class="row no-gutter margin-bottom-0">
<div class="col s12">
<h4 class="main-text lighten-1">Initialization</h4>
<pre>
<code class="language-javascript">
$(document).ready(function(){
$('.scrollspy').scrollSpy();
});
</code>
</pre>
</div>
</div>
</div>
</div>
<div class="col hide-on-small-only m3 l2">
<div class="pushpin-wrapper">
<ul class="section table-of-contents">
<li><a href="#structure">Structure</a></li>
<li><a href="#initialization">Initialization</a></li>
</ul>
</div>
</div>
</div>
</section>