Documentation v8.2.8

Downloads Preview

Overview

Metronic exclusive components are written in Javascript without any jQuery dependency in order to make it easier to integrate with SPA frameworks such as Angular, React and Vue. However the Metronic HTML version stil uses jQuery as majority popular jQuery plugins are still on demand. During the build process the Javascript code from the source folder is minified and moved to the assets folder.

Global Initialization

The core components and 3rd-party plugins global initialization is handled in src/js/components/_init.js.

Components Initialization

All In-house components and 3rd-party plugins defined need to be initializated for SPA(Single Page Application) or dynamic ajax pages.
KTComponents.init();

Layout Initialization

The layout partials(e.g: Sidebar, Header, Search, Toolbar, etc) need to be initializated(if defined) for SPA(Single Page Application) or dynamic ajax pages. Look for available layout classes in src/js/layout folder.
// Layout partials initialization
KTAppHeader.init();
KTAppSidebar.init();
KTAppSearch.init();
For SPA(Single Page Application) or dynamic ajax pages the layout initializaiton should not be done on document content ready event KTUtil.onDOMContentLoaded() so the initializaiton should be moved to a relevant place instead.
Preview Get Help Buy Now