forked from patrickmarabeas/ng-ScrollSpy.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
65 lines (45 loc) · 2.46 KB
/
index.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
<!DOCTYPE html>
<html data-ng-app="demo">
<head>
<title>AngularJS ng-ScrollSpy.js</title>
<script type="text/javascript" src="demo/scripts/angular.min.js"></script>
<script type="text/javascript" src="demo/scripts/demo.js"></script>
<script type="text/javascript" src="src/ng-ScrollSpy.js"></script>
<link rel="stylesheet" type="text/css" href="demo/styles/main.css"/>
</head>
<body>
<header id="top">
<a href="https://github.com/patrickmarabeas/ng-ScrollSpy.js">View it on GitHub</a>
<a href="https://github.com/patrickmarabeas/ng-ScrollSpy.js/zipball/master">Download ZIP</a>
<a href="https://github.com/patrickmarabeas/ng-ScrollSpy.js/tarball/master">Download TAR</a>
<a href="https://github.com/patrickmarabeas">@patrickmarabeas</a>
</header>
<nav>
<span class="item" data-scrollspy-listen="code">ng-ScrollSpy.js</span>
<span class="item" data-scrollspy-listen="hongkong">Hong Kong</span>
<span class="item" data-scrollspy-listen="newyork">New York</span>
<span class="item" data-scrollspy-listen="london">London</span>
<span class="item" data-scrollspy-listen="sydney">Sydney</span>
</nav>
<section id="code" data-scrollspy-broadcast>
<div class="wrapper">
<p>Grab it with Bower:</p>
<code>bower install ng-ScrollSpy.js</code>
<p>Include it in your AngularJS application</p>
<code>var myApp = angular.module( 'myApp', [ 'ngScrollSpy' ] );</code>
<p>The following line is your navigation item element which will be given an `active` class when the specified ID is
spied upon. It is element type unspecific. You can listen for multiple elements with pipe separation.</p>
<code><span data-scrollspy-listen="myID">myID</span></code>
<code><span data-scrollspy-listen="myID|another">multiple</span></code>
<p>This is the element you wish to spy on. Offset can be set specifically on elements as well.</p>
<code><section id="myID" data-scrollspy-broadcast data-scrollspy-offset="100"></section></code>
<p>See readme.md for more options available</p>
<p>NOTE: this AngularJS module is simply a scrollspy, anchor linking / smooth scrolling is another modules concern.</p>
</div>
</section>
<section id="hongkong" data-scrollspy-broadcast data-expand></section>
<section id="newyork" data-scrollspy-broadcast data-expand></section>
<section id="london" data-scrollspy-broadcast data-expand></section>
<section id="sydney" data-scrollspy-broadcast data-expand></section>
</body>
</html>