Skip to content

Commit ff0ea2c

Browse files
Include instructions to include shortcut sript tags
1 parent 91333b4 commit ff0ea2c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

shortcuts/infinite-scroll/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ <h2 class="my-sticky-element">Infinite Scroll</h2>
177177
</div>
178178

179179
<div class="inner">
180+
<p>First include the shortcut script.</p>
181+
182+
<pre><code>&lt;<span class="fn">script</span> <span class="kw">src</span>=<span class="str">"/path/to/waypoints-infinite.min.js"</span>&gt;&lt;<span class="fn">/script</span>&gt;</code></pre>
183+
180184
<p>The Infinite Scroll shortcut is used to transform a traditional "Next Page" navigation into an AJAX-powered infinite scrolling UI pattern. Its default usage looks like this:</p>
181185

182186
<pre><code><span class="fn">$</span>(<span class="str">'.infinite-container'</span>).<span class="fn">waypoint</span>(<span class="str">'infinite'</span>);</code></pre>

shortcuts/sticky-elements/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ <h2 class="my-sticky-element">Sticky Elements</h2>
143143
</div>
144144

145145
<div class="inner">
146+
<p>First include the shortcut script.</p>
147+
148+
<pre><code>&lt;<span class="fn">script</span> <span class="kw">src</span>=<span class="str">"/path/to/waypoints-sticky.min.js"</span>&gt;&lt;<span class="fn">/script</span>&gt;</code></pre>
149+
146150
<p>The Sticky Elements shortcut is used to make elements "stick" to the top of the page when the user scrolls past. It packages a few best practices around this pattern into one simple function extension of jQuery Waypoints. The most basic usage looks like this:</p>
147151

148152
<pre><code><span class="fn">$</span>(<span class="str">'.my-sticky-element'</span>).<span class="fn">waypoint</span>(<span class="str">'sticky'</span>);</code></pre>

0 commit comments

Comments
 (0)