Make JS a bit simpler
[plack-app-gruntmaster.git] / js / 90-mobilenav.js
index 36e7298b9b4b43e834b9fd6c7be2a41f97b72e45..bd47c8f90091af3f3fe1744931e6bae949f25748 100644 (file)
@@ -1,6 +1,6 @@
 $(function(){
-       const nav = $('nav')[0];
+       const nav = q('nav');
        nav.classList.add('hidden-xs');
-       $('#title')[0].insertAdjacentHTML('beforebegin', '<div class="text-center visible-xs-block">Tap title to toggle menu</div>');
+       q('#title').insertAdjacentHTML('beforebegin', '<div class="text-center visible-xs-block">Tap title to toggle menu</div>');
        $('#title').on('click', () => nav.classList.toggle('hidden-xs'));
 });
This page took 0.009704 seconds and 4 git commands to generate.