Here we'll explain where to write your own custom Javascript.

Bootstrap 4 documentation

Leaf's main javascript file is located at js/leaf.js. If you ran one of the gulp commands, you'll observe another file called leaf.min.js which is a minified version of the previous file.

Note: by default, the leaf.min.js is the file included in the templates.


We use jQuery to select elements and work with 3rd party plugins. The entirety of the custom JS is wrapped in a classic jQuery(document).ready(function(){}) function to make sure the page is loaded before the scripts will be running.

We recommend to use jQuery for basic DOM operations but obviously you can customize this file or furtherly add other Javascript files to your liking.


All of the standard Bootstrap 4 Javascript actions are available in Pixel so check out their documentation.