The subnavigation on the left is a live demo of the affix plugin.
To easily add affix behavior to any element, just add
data-spy="affix" to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.
<div data-spy="affix" data-offset-top="200">...</div>
affix-bottom. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page.
data-, as in
|offset||number | function | object||10||Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object
This page was last modified on Friday, 18th July 2014 at 12:06:21 by Gary Keeling. © 2019 GKWeb Design. not complete