Тёмный

How to close sidebar menu when click outside of it using html, css & javascript. 

MakeTechStuff
Подписаться 1,9 тыс.
Просмотров 24 тыс.
50% 1

In this video, I will show you how to close a sidebar menu when a user clicks outside of it using HTML, CSS, and JavaScript. This is a great way to improve the user experience of your website or web application.
We will start by creating an HTML sidebar menu. Then, we will add some CSS to style the sidebar menu. Finally, we will write some JavaScript code that will listen for the click event outside of the sidebar menu and close the menu accordingly.
For Source Code visit:
www.maketechstuff.com/
You may have to search ('menu') on website.

Хобби

Опубликовано:

 

25 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@Koinensegg_Oceania3827
@Koinensegg_Oceania3827 17 дней назад
Great Thing To Show Us!
@mikesalinas6245
@mikesalinas6245 2 месяца назад
Bien explicado... genial el vídeo!! Saluditos desde Mty
@verbena0815
@verbena0815 11 месяцев назад
Finally.. thanks sir ❤️
@farshidmedia
@farshidmedia 11 месяцев назад
Perfect 👌
@KareemNasser07
@KareemNasser07 8 месяцев назад
It works, thanks
@Maketechstuffs
@Maketechstuffs 8 месяцев назад
You're welcome!
@lightingvulture
@lightingvulture Год назад
thank you
@Maketechstuffs
@Maketechstuffs Год назад
You're welcome
@bigjoshallen
@bigjoshallen 8 месяцев назад
How come you don't use a links to create the nav bar
@sogenohata1948
@sogenohata1948 Год назад
can you simply add ".active" before another class name on CSS, without defining it first on HTML?
@Maketechstuffs
@Maketechstuffs Год назад
Yes you can add, but if that another class is not in html, then styles will not applied to it. or may be show error, when you add that active class using javascript.
@louisestreem
@louisestreem 2 месяца назад
@@Maketechstuffs why it dons't work on mine in vscode i followed the steps but it didn't work broooooooooooooooooooooooooooooooooooooooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@Maketechstuffs
@Maketechstuffs 2 месяца назад
Source code available on maketechstuff.com website. You can compare both the codes (yours and mines).
@FRESHSHOW_RD
@FRESHSHOW_RD 5 месяцев назад
Please what's the purpose of that .active class you add to it?
@Maketechstuffs
@Maketechstuffs 5 месяцев назад
I've explained in blog post. www.maketechstuff.com/2022/11/close-sidebar-menu-when-click-outside-of-it.html
@raniranu2601
@raniranu2601 7 месяцев назад
How know the background music 😂😂😂😂😂😂😂😂😂😂😂
@thestar001Official
@thestar001Official 4 месяца назад
You know you could have just cut out the first part 😏
Далее
Click Outside to Close - React Hook
6:37
Просмотров 59 тыс.
Самое Романтичное Видео ❤️
00:16
Top 10 CSS One Liners That Will Blow Your Mind
13:34
Просмотров 917 тыс.
Why the Nothing CMF Phone 1 is a Game Changer.
14:44
Просмотров 1,7 млн
Click Outside to Close - React Hook
9:15
Просмотров 50 тыс.
Subtle, yet Beautiful Scroll Animations
5:04
Просмотров 1,6 млн
CSS Tips And Tricks I Wish I Knew Before
12:12
Просмотров 440 тыс.
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
0:27
Будни в пекарне. Часть 1
0:59
Просмотров 4,3 млн