notebook/app/assets/javascripts/_initialization.js
2020-09-18 20:19:32 -07:00

28 lines
875 B
JavaScript

//# This file is prepended with an underscore to ensure it comes alphabetically-first
//# when application.js includes all JS files in the directory with require_tree.
//# Here be dragons.
if (!window.Notebook) { window.Notebook = {}; }
Notebook.init = function() {
// Initialize MaterializeCSS stuff
M.AutoInit();
$('.sidenav').sidenav();
$('.quick-reference-sidenav').sidenav({
closeOnClick: true,
edge: 'right',
draggable: false
});
$('#recent-edits-sidenav').sidenav({
closeOnClick: true,
edge: 'right',
draggable: false
});
$('.slider').slider({ height: 200, indicators: false });
$('.dropdown-trigger').dropdown({ coverTrigger: false });
$('.tooltipped').tooltip({ enterDelay: 50 });
$('.with-character-counter').characterCounter();
$('.materialboxed').materialbox();
};
$(() => Notebook.init());