Keen - The Ultimate Multi-Demo Bootstrap Admin Theme

The most complete UI/UX template solution for today's web projects of any size

Keen Header

Overview

KHeader is a Keen's custom plugin defined in[root]/theme/default/src/theme/framework/components/base/header/header.js.

Initialization

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

var header = new KHeader(id, options);
var header = new KHeader('k_header', {
    classic: false,
    offset: {
        mobile: 150,
        desktop: 200
    },
    minimize: {
        mobile: false,
        desktop: false
    }
});

Options

var options = {
    classic: false,
    offset: {
        mobile: 150,
        desktop: 200
    },
    minimize: {
        mobile: false,
        desktop: false
    }
}
Field Type Description
classic boolean

Header type

Sample
classic: false
offset object

Set header top offset for both desktop and mobile mode

Sample
offset: {
    mobile: 150,
    desktop: 200
}
minimize object

Set header minimize for both desktop and mobile mode

Sample
offset: {
    mobile: false,
    desktop: false
}

API Methods

Method Description
setDefaults(options)

Set default options

Input Parameters
Name Type Description
options object

A new options object for the menu

on(name, handler)

Register event

Input Parameters
Name Type Description
name string

Unique event name

handler function

Callback function handler for the event

one(name, handler)

Register event to be run once

Input Parameters
Name Type Description
name string

Unique event name

handler function

Callback function handler for the event