From 07589dc43c9d5f71bed83b04741adb84915e8bc2 Mon Sep 17 00:00:00 2001 From: jen67 Date: Thu, 28 Dec 2023 22:59:22 +0100 Subject: [PATCH] started with jquery --- J-query-sidenav/script.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/J-query-sidenav/script.js b/J-query-sidenav/script.js index cbd85d7..81d4dde 100644 --- a/J-query-sidenav/script.js +++ b/J-query-sidenav/script.js @@ -30,7 +30,10 @@ // Jquery - +(function () { + + "use strict"; + $('ul li ul').hide(); $('.menulink').click(function () { @@ -39,4 +42,6 @@ $('.menulink').click(function () { $('ul li ul').not(thisMenu).hide(); thisMenu.toggle(); -}); \ No newline at end of file +}); + +})(); \ No newline at end of file