Carousel

Carousel

Source:
Parameters:
NameTypeDescription
elementHTMLElement

DOM element for component instantiation and scope

optionsObject
Properties
NameTypeDescription
toggleSelectorString

Selector for toggling element

prevSelectorString

Selector for prev element

nextSelectorString

Selector for next element

contentClassString

Selector for the content container

slidesClassString

Selector for the slides container

slideClassString

Selector for the slide items

navigationClassString

Selector for the navigation container

currentSlideClassString

Selector for the counter current slide number

Classes

Carousel

Methods

checkBannerHeights()

Description:
  • Set the banners height above the xl breakpoint

Source:

checkIndex()

Description:
  • Action to update slides index and position.

Source:

destroy()

Description:
  • Destroy component.

Source:

dragAction(e)

Description:
  • TouchMove handler.

Source:
Parameters:
NameTypeDescription
eEvent

dragEnd()

Description:
  • TouchEnd handler.

Source:

dragStart(e)

Description:
  • TouchStart handler.

Source:
Parameters:
NameTypeDescription
eEvent

handleAutoPlay()

Description:
  • Toggles play/pause slides.

Source:

handleFocus(e)

Description:
  • Trigger events on focus.

Source:
Parameters:
NameTypeDescription
eEvent

handleKeyboardOnBullets(e)

Source:
Parameters:
NameTypeDescription
eEvent

handleKeyboardOnPlay(e)

Source:
Parameters:
NameTypeDescription
eEvent

handleMouseOut()

Description:
  • Trigger events on mouseout.

Source:

handleMouseOver()

Description:
  • Trigger events on mouseover.

Source:

handleResize()

Description:
  • Trigger events on resize.

Source:

init()

Description:
  • Initialise component.

Source:

moveSlides(transition)

Description:
  • Transition for the slides.

Source:
Parameters:
NameTypeDescription
transitionBoolean

resetBannerHeights()

Description:
  • Set the banners height below the xl breakpoint

Source:

shiftSlide(dir, stopAutoPlay)

Description:
  • Action to shift next or previous slide.

Source:
Parameters:
NameTypeDescription
dirint | string
stopAutoPlayBoolean

(static) autoInit(root) → {Carousel}

Source:
Parameters:
NameTypeDescription
rootHTMLElement

DOM element for component instantiation and scope

Returns:

An instance of Carousel.

Type
Carousel