UNPKG

10.6 kBHTMLView Raw
1<!doctype html>
2<head>
3 <meta charset="utf-8">
4 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
5 <title>Tether – Marrying elements for life</title>
6 <meta name="description" content="Tether is a JavaScript and CSS library. It is free and open source and was developed by HubSpot developers Adam Schwartz (@adamfschwartz) and Zack Bloom (@zackbloom).">
7 <link rel="icon" href="http://static.hubspot.com/favicon.ico">
8
9 <script type="text/javascript" src="//use.typekit.net/ghy0wve.js"></script>
10 <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
11
12 <!-- Tether themes -->
13 <link rel="stylesheet" href="//github.hubspot.com/tether/dist/css/tether-theme-arrows-dark.css" />
14
15 <!-- Welcome docs styles -->
16 <link rel="stylesheet" href="//github.hubspot.com/tether/docs/welcome/css/prism.css" />
17 <link rel="stylesheet" href="//github.hubspot.com/tether/docs/welcome/css/welcome.css" />
18
19 <!-- OS icons -->
20 <link rel="stylesheet" href="http://github.hubspot.com/os-icons/os-icons.css" />
21</head>
22<body>
23 <div class="hero-wrap">
24 <table class="showcase hero"><tr><td>
25 <div class="showcase-inner">
26 <div class="tether-target-demo">
27 <h1>Tether</h1>
28 <div class="mobile-copy">
29 <h2>Marrying elements for life</h2>
30 <p>
31 <a class="button" href="http://github.com/HubSpot/tether">★ On Github</a>
32 </p>
33 </div>
34 </div>
35 </div>
36 </td></tr></table>
37 </div>
38
39 <div class="browser-demo-start-point"></div>
40
41 <table class="showcase browser-demo"><tr><td>
42 <div class="showcase-inner">
43 <div class="section-copy" data-section="what">
44 <h2>What is Tether?</h2>
45 </div>
46 <div class="section-copy" data-section="how">
47 <h2>How Tether works.</h2>
48 </div>
49 <div class="section-copy" data-section="why">
50 <h2>Tether is powerful.</h2>
51 </div>
52 <div class="section-copy" data-section="outro">
53 <h2>Play with Tether</h2>
54 </div>
55 <div class="browser-demo-inner">
56 <div class="browser-window">
57 <div class="browser-titlebar">
58 <div class="browser-dots"><b></b><b></b><b></b></div>
59 </div>
60 <div class="browser-frame">
61 <iframe src="browser-demo.html"></iframe>
62 </div>
63 </div>
64 </div>
65 </div>
66 </td></tr></table>
67
68 <table class="showcase browser-demo-section no-next-arrow" data-section="what"><tr><td>
69 <div class="section-scroll-copy">
70 <div class="section-scroll-copy-inner">
71 <p>Tether is a low-level UI library that can be used to position any element on a page <i>next to any other element</i>.</p>
72 <p>It can be used for dropdown menus, tooltips, popovers, tours, help information, scroll guides, autocompletes, etc. The possibilities are endless.</p>
73 <p class="example-paragraph">In this example we're showing an action menu <em>tethered</em> to a list item.</p>
74 </div>
75 </div>
76 </td></tr></table>
77
78 <table class="showcase browser-demo-section no-next-arrow" data-section="how"><tr><td>
79 <div class="section-scroll-copy">
80 <div class="section-scroll-copy-inner">
81 <p>Tether works by creating an absolutely positioned element and meticulously tracking the movements of a <i>target</i> which you specify.</p>
82 <p>The <i>target</i> and <i>element</i> can be tethered together in a variety of different ways.</p>
83 <p class="example-paragraph">Notice how the <i>tethered element</i> stays tethered to its <i>target</i> list item even as the left pane is scrolled up and down.</p>
84 </div>
85 </div>
86 </td></tr></table>
87
88 <table class="showcase browser-demo-section no-next-arrow" data-section="why"><tr><td>
89 <div class="section-scroll-copy">
90 <div class="section-scroll-copy-inner">
91 <p>Tether can keep your element positioned properly even in some tough situations.</p>
92 <p>Tether handles all of the common pain points:</p>
93 <ul>
94 <li>Automatically detect collisions with the edge of the page or edge of the scrollParent</li>
95 <li>Automatically reposition on browser resize, scroll, and other events,</li>
96 <li>Constrain the position to any bounding box,</li>
97 </ul>
98 <p>...and a lot more.</p>
99 </div>
100 </div>
101 </td></tr></table>
102
103 <table class="showcase browser-demo-section no-next-arrow" data-section="outro"><tr><td>
104 <div class="section-scroll-copy">
105 <div class="section-scroll-copy-inner">
106 <p class="example-paragraph">Interact with this demo.</p>
107 <p>&nbsp;</p>
108 <p>To learn more, check out our <a href="/">documentation</a>.</p>
109 </div>
110 </div>
111 </td></tr></table>
112
113 <table class="showcase browser-demo-section no-next-arrow" data-section="__empty"><tr><td></td></tr></table>
114
115 <div class="browser-demo-stop-point"></div>
116
117 <table class="showcase projects-showcase no-next-arrow"><tr><td>
118 <div class="showcase-inner">
119 <h1>Tether Family</h1>
120 <h2>These projects are all powered by Tether's positioning engine.</h2>
121 <div class="projects-list">
122 <a href="//github.hubspot.com/drop/docs/welcome" class="project">
123 <h1>Drop</h1>
124 <span class="os-icon drop-icon"></span>
125 <p>Create dropdowns, popovers, and more.</p>
126 </a>
127 <a href="//github.hubspot.com/tooltip/docs/welcome" class="project">
128 <h1>Tooltip</h1>
129 <span class="os-icon tooltip-icon"></span>
130 <p>Stylable tooltips built on Tether.</p>
131 </a>
132 <a href="//github.hubspot.com/select/docs/welcome" class="project">
133 <h1>Select</h1>
134 <span class="os-icon select-icon"></span>
135 <p>Stylable select elements built on Tether.</p>
136 </a>
137 <a href="//github.hubspot.com/shepherd/docs/welcome" class="project">
138 <h1>Shepherd</h1>
139 <span class="os-icon shepherd-icon"></span>
140 <p>Guide your users through a tour of your app.</p>
141 </a>
142 </div>
143 </div>
144 </td></tr></table>
145
146 <table class="showcase last-showcase no-next-arrow share"><tr><td>
147 <div class="showcase-inner">
148 <h1>Share</h1>
149 <h2>Help us spread the word.</h2>
150 <!-- Share -->
151 <style>
152 .share-buttons {
153 margin: 4em auto;
154 text-align: center;
155 }
156 .share-button {
157 display: inline-block;
158 }
159 .retweet-button {
160 width: 100px;
161 margin-left: 20px;
162 }
163 .github-stars {
164 width: 100px;
165 }
166 </style>
167 <div class="share-buttons">
168 <div class="share-button retweet-button">
169 <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://github.hubspot.com/tether/docs/welcome" data-text="Tether.js - A positioning engine for JavaScript" data-count="horizontal" data-via="HubSpotDev">Tweet</a>
170 <script>
171 (function(){
172 var recommends, button;
173
174 if (Math.random() >= 0.5) {
175 recommends = ['hubspotdev', 'zackbloom', 'adamfschwartz'];
176 } else {
177 recommends = ['hubspotdev', 'adamfschwartz', 'zackbloom'];
178 }
179
180 button = document.querySelector('.twitter-share-button');
181
182 if (button) {
183 button.setAttribute('data-related', recommends.join(','));
184 }
185 })();
186 </script>
187 <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
188 </div>
189 <div class="share-button github-stars-button">
190 <iframe src="http://ghbtns.com/github-btn.html?user=HubSpot&amp;repo=tether&amp;type=watch&amp;count=true&amp;size=small" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
191 </div>
192 </p>
193 </div>
194 </td></tr></table>
195
196 <!-- Tether javascript -->
197 <script src="//github.hubspot.com/tether/dist/js/tether.min.js"></script>
198
199 <!-- Welcome docs javascript -->
200 <script src="//github.hubspot.com/tether/docs/welcome/js/log.js"></script>
201 <script src="//github.hubspot.com/tether/docs/welcome/js/jquery.js"></script>
202 <script src="//github.hubspot.com/tether/docs/welcome/js/drop.js"></script>
203 <script src="//github.hubspot.com/tether/docs/welcome/js/welcome.js"></script>
204
205 <!-- HubSpot analytics -->
206 <script type="text/javascript">
207 (function(d,s,i,r) {
208 if (d.getElementById(i)){return;}
209 var n=d.createElement(s),e=d.getElementsByTagName(s)[0];
210 n.id=i;n.src='//js.hubspot.com/analytics/'+(Math.ceil(new Date()/r)*r)+'/51294.js';
211 e.parentNode.insertBefore(n, e);
212 })(document,"script","hs-analytics",300000);
213 </script>
214
215 <!-- Google analytics -->
216 <script>
217 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
218 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
219 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
220 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
221
222 ga('create', 'UA-45159009-1', 'auto');
223 ga('send', 'pageview');
224 </script>
225</body>
226</html>