From 6ba4803ed2636400ea1df8dad6b0b0e6b8d9d023 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Sun, 24 Dec 2017 20:58:15 +0100 Subject: [PATCH] jQuery -> new MaterializeCSS way --- static/js/init.js | 19 ++++++++----------- templates/base.html | 1 - 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/static/js/init.js b/static/js/init.js index 1d94bbe..26c36af 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -1,12 +1,9 @@ -(function($){ - $(function(){ +var options = {} +var elem = document.querySelector('.sidenav'); +var instance = new M.Sidenav(elem, options); - $('.sidenav').sidenav(); - - /* Initialise collapsible tags block */ - $(document).ready(function() { - $('.collapsible').collapsible(); - }); - - }); // end of document ready -})(jQuery); // end of jQuery name space +var elem = document.querySelector('.collapsible'); + var instance = new M.Collapsible(elem, { + // inDuration: 1000, + // outDuration: 1000 + }); diff --git a/templates/base.html b/templates/base.html index 07a3daa..893c062 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,7 +39,6 @@ } -