API Docs for:
Show:

Plugin.ScrollSpy Class

Extends Plugin.ScrollInfo
Defined in: js\scrollspy.js:1

A plugin for updating the active element of a list based on the scroll position of a certain node. Plug it into a scrollable node (usually the body) and set the target attribute to the list.

Constructor

Plugin.ScrollSpy

(
  • [config]
)

Defined in js\scrollspy.js:1

Parameters:

  • [config] Object optional

    Object literal containing configuration options

Item Index

Methods

Properties

  • NS static

Methods

refresh

()

Defined in js\scrollspy.js:19

Recalculates the current active node in the list and resets the active CSS class names.

Properties

NS

String static

Defined in js\scrollspy.js:49

Plugin namespace.

Default: 'scrollspy'

Attributes

activeClass

String

Defined in js\scrollspy.js:73

The class to apply to the active item in the list.

Default: 'yui3-menu-active'

scrollDelay

Number

Defined in js\scrollspy.js:59

Number of milliseconds by which ScrollSpy throttles the scroll event. Alternatively, provide a data-delay attribute in your plugged node.

Default: 15

target

String | Node

Defined in js\scrollspy.js:82

The target list. Usually a list with a yui3-menu class. Alternatively, provide a data-target attribute in your plugged node.