diff options
author | XhmikosR <xhmikosr@gmail.com> | 2018-11-28 22:46:06 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-02-20 23:05:45 +0300 |
commit | 709dcb98dd7e018acef82f1199ba547b4be0a9ba (patch) | |
tree | 5b7635ec6f3e136c7e6cd938c2a3a9c749c16c95 /site | |
parent | e04a5139ab09f42478161ba50d17540824117d46 (diff) |
Convert offcanvas.js to vanilla JS.
Diffstat (limited to 'site')
-rw-r--r-- | site/docs/4.3/examples/offcanvas/offcanvas.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/site/docs/4.3/examples/offcanvas/offcanvas.js b/site/docs/4.3/examples/offcanvas/offcanvas.js index bc3e467118..ddd19be824 100644 --- a/site/docs/4.3/examples/offcanvas/offcanvas.js +++ b/site/docs/4.3/examples/offcanvas/offcanvas.js @@ -1,7 +1,7 @@ -$(function () { +(function () { 'use strict' - $('[data-toggle="offcanvas"]').on('click', function () { - $('.offcanvas-collapse').toggleClass('open') + document.querySelector('[data-toggle="offcanvas"]').addEventListener('click', function () { + document.querySelector('.offcanvas-collapse').classList.toggle('open') }) -}) +}()) |