API Docs for:
Show:

Plugin.Affix Class

Extends Plugin.Base
Defined in: js\affix.js:1

A plugin that makes a node stick to a position when it scrolls over a certain offset. Based on Bootstrap's Affix plugin.

Constructor

Plugin.Affix

(
  • config
)

Defined in js\affix.js:1

Parameters:

  • config Object

    Object literal containing configuration options

    • host Object

      Node or widget (the boundingBox will be used)

    • [offset] Object | Number optional

      The offset to use. If not found it will default to data-offset-top, data-offset-left or data-offset properties on the host

      • [left] Number optional
        Left offset to use. At least one of top or left should be used
      • [top] Number optional
        Top offset to use.

Item Index

Methods

Properties

Methods

_getNode

() private

Defined in js\affix.js:21

Get the correct node when plugged in Nodes or Widgets

Returns:

Node

refresh

()

Defined in js\affix.js:77

Fixes or releases the node according to the scroll position. Called automatically when scrolling.

Properties

_handle

Object private

Defined in js\affix.js:66

Event handle for the document's scroll event.

_x

Number private

Defined in js\affix.js:47

The original left position of the node. Used to calculate if the node is over the offset.

_y

Number private

Defined in js\affix.js:56

The original top position of the node. Used to calculate if the node is over the offset.

NS

String static

Defined in js\affix.js:135

Plugin namespace

Default: "affix"