<h3>Via data attributes</h3>
<p>To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.</p>
- <pre class="prettyprint linenums"><div data-spy="affix" data-offset-top="200">...</body></pre>
+ <pre class="prettyprint linenums"><div data-spy="affix" data-offset-top="200">...</div></pre>
<div class="alert alert-info">
<strong>Heads up!</strong>
<h3>{{_i}}Via data attributes{{/i}}</h3>
<p>{{_i}}To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.{{/i}}</p>
- <pre class="prettyprint linenums"><div data-spy="affix" data-offset-top="200">...</body></pre>
+ <pre class="prettyprint linenums"><div data-spy="affix" data-offset-top="200">...</div></pre>
<div class="alert alert-info">
<strong>{{_i}}Heads up!{{/i}}</strong>