KTScrolltop is a Keen's custom plugin defined in [root]/theme/default/src/theme/framework/components/base/scrolltop/scrolltop.js.
KTScrolltop is a Keen's custom plugin defined in [root]/theme/default/src/theme/framework/components/base/scrolltop/scrolltop.js.
First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.
var scrollTop = new KTScrolltop(id, options);
var scrollTop = new KTScrolltop('kt_scrolltop', {
offset: 300,
speed: 600,
toggleClass: 'kt-scrolltop--on'
});
var options = {
offset: 300,
speed: 600,
toggleClass: 'kt-scrolltop--on'
};
| Field | Type | Description | ||
|---|---|---|---|---|
offset |
number |
Bottom offset for the scroll top button icon
|
||
speed |
number |
Speed of scroll to the top page
|
||
toggleClass |
number |
Set the toggle class to
|
| Method | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setDefaults(options) |
Set default options
|
||||||||||||
on(name, handler) |
Register event
|
||||||||||||
one(name, handler) |
Register event to be run once
|
||||||||||||
Keen empowers your project with virtually limitless array of options
to create endless unique projects.
We truly hope that our love and dedication to produce an incredibly powerful high level solution suits all your project needs. We will continue to deliver incredible enterprise ready solutions for Angular, React and VueJS to serve you better. We sincerely hope you enjoyed using Keen as much as we enjoyed building it.