Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 142 lines (137 sloc) 7.931 kB
3eedaa9 @vitch Added a demo showing how anchors can work to automatically scroll to …
vitch authored
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5
6 <title>jScrollPane anchors demo</title>
7
8 <!-- styles specific to demo site -->
9 <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" />
10 <!-- styles needed by jScrollPane - include in your own sites -->
11 <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" />
12
13 <style type="text/css" id="page-css">
14 /* Styles specific to this particular page */
15 .scroll-pane
16 {
3388090 @vitch IE6 needs a specified width on the element jScrollPane is being appli…
vitch authored
17 width: 100%;
3eedaa9 @vitch Added a demo showing how anchors can work to automatically scroll to …
vitch authored
18 height: 200px;
19 overflow: auto;
20 }
21 </style>
22
23 <!-- latest jQuery direct from google's CDN -->
3197c00 @vitch Updating all demos to use the latest version of jQuery to reveal any …
vitch authored
24 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
3eedaa9 @vitch Added a demo showing how anchors can work to automatically scroll to …
vitch authored
25 <!-- the mousewheel plugin -->
26 <script type="text/javascript" src="script/jquery.mousewheel.js"></script>
27 <!-- the jScrollPane script -->
28 <script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script>
29 <!-- scripts specific to this demo site -->
30 <script type="text/javascript" src="script/demo.js"></script>
31
32 <script type="text/javascript" id="sourcecode">
33 $(function()
34 {
35 $('.scroll-pane').jScrollPane(
36 {
37 hijackInternalLinks: true
38 }
39 );
40 });
41 </script>
42 </head>
43 <body>
c339c56 @vitch Added navigation and logo to top of all pages...
vitch authored
44 <div id="top-nav">
45 <img src="image/logo.png" width="196" height="69" alt="jScrollPane">
46 <ul>
47 <li><a href="index.html">Home</a></li>
48 <li><a href="index.html#examples">Examples</a></li>
49 <li><a href="index.html#themes">Themes</a></li>
50 <li><a href="index.html#usage">How to use</a></li>
51 <li><a href="faqs.html">FAQs</a></li>
52 <li><a href="known_issues.html">Known issues</a></li>
53 <li><a href="index.html#support">Support</a></li>
54 <li><a href="index.html#download">Download</a></li>
55 </ul>
56 </div>
3eedaa9 @vitch Added a demo showing how anchors can work to automatically scroll to …
vitch authored
57 <div id="container">
58 <h1>jScrollPane - anchors demo page</h1>
59 <p>
60 This demonstration shows how jScrollPane can check the location.hash when the page loads and
61 automatically scroll the pane to the correct place if the hash refers to an element within the scroll
62 pane. jScrollPane can also hijack links within your page and automatically convert relevant ones to
63 scroll the jScrollPane. As an example, the following links will scroll to the paragraphs in the scroll
64 pane below: <a href="#para1">1</a>, <a href="#para2">2</a>, <a href="#para3">3</a>,
65 <a href="#para4">4</a> and <a href="#para5">5</a>. <a href="#sourcecode-display">This link</a> (to the
66 sourcecode listing below) is also an internal link but because its target isn't within the scrollpane
67 we don't mess with it.
68 </p>
69 <p>
70 <strong>Note</strong> that the link hijacking functionality is off by default (as it has a small
71 performance overhead so if you don't need it you might as well not have it). To enable it pass
ed40602 @vitch Added extra documentation and examples to the site...
vitch authored
72 <strong><a href="settings.html#hijackInternalLinks">hijackInternalLinks</a>: true</strong> in with
73 your settings (as I do on this page). If you have changed the content of your page and want to re-apply
74 the link hijacking then you can call the <a href="api.html#hijackInternalLinks">hijackInternalLinks</a>
75 method on the jScrollPane API.
3eedaa9 @vitch Added a demo showing how anchors can work to automatically scroll to …
vitch authored
76 </p>
77 <div class="scroll-pane">
78 <p id="para1">
79 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec in ligula id sem tristique ultrices
80 eget id neque. Duis enim turpis, tempus at accumsan vitae, lobortis id sapien. Pellentesque nec orci
81 mi, in pharetra ligula. Nulla facilisi. Nulla facilisi. Mauris convallis venenatis massa, quis
82 consectetur felis ornare quis. Sed aliquet nunc ac ante molestie ultricies. Nam pulvinar ultricies
83 bibendum. Vivamus diam leo, faucibus et vehicula eu, molestie sit amet dui. Proin nec orci et elit
84 semper ultrices. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus
85 mus. Sed quis urna mi, ac dignissim mauris. Quisque mollis ornare mauris, sed laoreet diam malesuada
86 quis. Proin vel elementum ante. Donec hendrerit arcu ac odio tincidunt posuere. Vestibulum nec risus
87 eu lacus semper viverra.
88 </p>
89 <p id="para2">
90 Vestibulum dictum consectetur magna eu egestas. Praesent molestie dapibus erat, sit amet sodales
91 lectus congue ut. Nam adipiscing, tortor ac blandit egestas, lorem ligula posuere ipsum, nec
92 faucibus nisl enim eu purus. Quisque bibendum diam quis nunc eleifend at molestie libero tincidunt.
93 Quisque tincidunt sapien a sapien pellentesque consequat. Mauris adipiscing venenatis augue ut
94 tempor. Donec auctor mattis quam quis aliquam. Nullam ultrices erat in dolor pharetra bibendum.
95 Suspendisse eget odio ut libero imperdiet rhoncus. Curabitur aliquet, ipsum sit amet aliquet varius,
96 est urna ullamcorper magna, sed eleifend libero nunc non erat. Vivamus semper turpis ac turpis
97 volutpat non cursus velit aliquam. Fusce id tortor id sapien porta egestas. Nulla venenatis luctus
98 libero et suscipit. Sed sed purus risus. Donec auctor, leo nec eleifend vehicula, lacus felis
99 sollicitudin est, vitae lacinia lectus urna nec libero. Aliquam pellentesque, arcu condimentum
100 pharetra vestibulum, lectus felis malesuada felis, vel fringilla dolor dui tempus nisi. In hac
101 habitasse platea dictumst. Ut imperdiet mauris vitae eros varius eget accumsan lectus adipiscing.
102 </p>
103 <p id="para3">
104 Quisque et massa leo, sit amet adipiscing nisi. Mauris vel condimentum dolor. Duis quis ullamcorper
105 eros. Proin metus dui, facilisis id bibendum sed, aliquet non ipsum. Aenean pulvinar risus eu nisi
106 dictum eleifend. Maecenas mattis dolor eget lectus pretium eget molestie libero auctor. Praesent sit
107 amet tellus sed nibh convallis semper. Curabitur nisl odio, feugiat non dapibus sed, tincidunt ut
108 est. Nullam erat velit, suscipit aliquet commodo sit amet, mollis in mauris. Curabitur pharetra
109 dictum interdum. In posuere pretium ultricies. Curabitur volutpat eros vehicula quam ultrices
110 varius. Proin volutpat enim a massa tempor ornare. Sed ullamcorper fermentum nisl, ac hendrerit sem
111 feugiat ac. Donec porttitor ullamcorper quam. Morbi pretium adipiscing quam, quis bibendum diam
112 congue eget. Sed at lectus at est malesuada iaculis. Sed fermentum quam dui. Donec eget ipsum dolor,
113 id mollis nisi. Donec fermentum vehicula porta.
114 </p>
115 <p id="para4">
116 Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
117 Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero
118 sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
119 Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed,
120 commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros
121 ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis.
122 Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna
123 eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis
124 luctus, metus
125 </p>
126 <p id="para5">
127 Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
128 Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit
129 amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
130 </p>
131 </div>
132 <h2>Page javascript</h2>
133 <div id="sourcecode-display">
134 <p>The contents of this div will be replaced by the javascript added to this page</p>
135 </div>
136 <h2>Page CSS</h2>
137 <div id="css-display">
138 <p>The contents of this div will be replaced by the CSS added to this page</p>
139 </div>
140 </div>
141 </body>
142 </html>
Something went wrong with that request. Please try again.