KTToggle is a Keen's custom plugin defined in [root]/theme/default/src/theme/framework/components/base/toggle/toggle.js.
KTToggle is a Keen's custom plugin defined in [root]/theme/default/src/theme/framework/components/base/toggle/toggle.js.
First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.
var asideLeftToggle = new KTToggle('kt_aside_toggler', options);
var options = {
target: 'body',
targetState: 'kt-header__topbar--mobile-on',
togglerState: 'kt-header-mobile__toolbar-topbar-toggler--active'
};
| Field | Type | Description | ||
|---|---|---|---|---|
target |
string |
The target for the class name changed
|
||
targetState |
string |
The state class name to be added to the
|
||
togglerState |
string |
The active state for the toggler
|
| Method | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setDefaults(options) |
Set default options
|
||||||||||||
getState() |
Get toggler state |
||||||||||||
toggle() |
Toggle the toggler |
||||||||||||
toggleOn() |
Set the toggler on |
||||||||||||
toggleOff() |
Set the toggler off |
||||||||||||
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.