SliderPager

SliderPager

new SliderPager(element, options)

Source:
Parameters:
Name Type Description
element HTMLElement

DOM element for component instantiation and scope

options Object
Properties
Name Type Description
slider String

Slider instance (embla)

accessibility String

Accessibility plugin instance (embla)

pagerElement String

Slider pager

prevSelector String

Css class of the prev button

nextSelector String

Css class of the next button

dotsSelector String

Css class of the dots wrapper

dotSelector String

Css class of the single dot

activeDotSelector String

Css class to be assigned to the active dot

dotTemplateSelector String

Dots template selector

Classes

SliderPager

Methods

destroy()

Description:
  • Destroy component.

Source:

escapeSlider()

Description:
  • Moves the focus out of the slider when Escape is pressed.

Source:

handleKeyboard()

Description:
  • Handle keyboard events for accessibility.

Source:

handleResize()

Description:
  • Trigger events on resize Uses a debounce, for performance

Source:

init()

Description:
  • Initialise component.

Source:

onNextClick()

Description:
  • Next button click handler.

Source:

onPrevClick()

Description:
  • Prev button click handler

Source:

rebuildDots()

Description:
  • Generate dots.

Source:

toggleButtonsDisabled()

Description:
  • Toggle disable status of the prev and next buttons.

Source:

updateDots()

Description:
  • Update dots status.

Source: