KTOffcanvas is a Keen's custom plugin defined in [root]/theme/default/src/theme/framework/components/base/offcanvas/offcanvas.js.
KTOffcanvas is a Keen's custom plugin defined in [root]/theme/default/src/theme/framework/components/base/offcanvas/offcanvas.js.
First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.
var headerMenuOffcanvas = new KTOffcanvas(id, options)
var headerMenuOffcanvas = new KTOffcanvas('kt_header_menu_wrapper', {
overlay: true,
baseClass: 'kt-header-menu-wrapper',
closeBy: 'kt_header_menu_mobile_close_btn',
toggleBy: {
target: 'kt_header_mobile_toggler',
state: 'kt-header-mobile__toolbar-toggler--active'
}
});
var options = {
overlay: true,
baseClass: 'kt-header-menu-wrapper',
closeBy: 'kt_header_menu_mobile_close_btn',
toggleBy: {
target: 'kt_header_mobile_toggler',
state: 'kt-header-mobile__toolbar-toggler--active'
}
}
| Field | Type | Description | ||
|---|---|---|---|---|
overlay |
boolean |
Enable/disable offcanvas overlay
|
||
baseClass |
string |
Set the base class for the offcanvas
|
||
closeBy |
string |
Define the element for the off canvas to be closed when this element is clicked
|
||
toggleBy |
object |
Define which element for the toggle and set the active state class name
|
| Method | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setDefaults(options) |
Set default options
|
||||||||||||
show() |
Set show dropdown |
||||||||||||
hide() |
Set hide dropdown |
||||||||||||
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.