logo The World’s #1 Bootstrap 4 HTML, Angular 9, React, VueJS & Laravel
Admin Dashboard Theme

Scrolltop

Overview

KTScrolltop is a Metronic's custom plugin defined in [metronic]/theme/html/[demo]/src/js/components/base/scrolltop.js.

Initialization

First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.

var _object = new KTScrolltop(_element, {
  offset: 300,
  speed: 600,
});

Options

var options = {
    offset: 300,
    speed: 600,
};
Field Type Description
offset number

Bottom offset for the scroll top button icon

Sample
offset: 300
speed number

Speed of scroll to the top page

Sample
speed: 600

API Methods

Method Description
on(name, handler)

Get subscrolltop mode

one(name, handler)

Set scrolltop content @returns {mscrolltop}