BackToTop

Displays 'Back to Top' button when user scrolls up quickly

Source:
Properties:
Name Type Description
oldScrollValue Integer

initial vertical position on the page

tabletBreakpoint Integer

Tablet-portrait breakpoint, same as in CSS

tagMetaSelector String

DOM reference to tag meta header

buttonDivSelector String

Class reference for Back to Top button container

buttonDivModifier String

CSS modifier accounting for larger tag meta header offset

buttonSelector String

Class reference for Back to Top button

fadeInClass String

Fade in animation class

fadeOutClass String

Fade out animation class

resetClass String

3d transform animation class

$buttonDiv Object

DOM reference to Back to Top button

Methods

(inner) handleBackToTopClick()

Source:

Handles click on 'Back To Top' button

(inner) handleScroll()

Source:

Handles upward page scroll.

(inner) handleScroll()

Source:

Handles downward page scroll.

(inner) handleScroll()

Source:

Handles page scroll back to the top.

(inner) hideButton()

Source:

Brings 'Back To Top' button out of view

(inner) init()

Source:

Initializes 'Back To Top' button on article pages

(inner) showButton()

Source:

Brings 'Back To Top' button into view