Add javascript support for the Bootstrap affix plugin
static void
affix
([string $selector = 'affix'], [array $params = array()])
-
string
$selector: Unique selector for the element to be affixed.
-
array
$params: An array of options. Options for the affix plugin can be:
- offset number|function|object 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 offset: { x: 10 }.
Use a function when you need to dynamically provide an offset
(useful for some responsive designs).