Build a Popup With JavaScript

  Рет қаралды 372,965

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 327
@Uncaught_in_promise
@Uncaught_in_promise 3 жыл бұрын
This is most comprehensive and straightforward tutorial on modals I've ever seen. What makes it unique - handling multiple modals. Most of KZbin educators show only how singular modal works.
@nikhilsharma2982
@nikhilsharma2982 4 жыл бұрын
Hi, your way of explaining the each and every details and your approach of covering every dependent elements which are being used or going to be affected in the background is simply awesome. Thanks a lot for covering it in a speedy but with a very simplified way.
@juicifer2024
@juicifer2024 2 жыл бұрын
im not joking when i say you have taught me more about web development than any college programming course did. Thank you for teaching the public in a very clear concise way.
@ryand640
@ryand640 4 жыл бұрын
Seriously strong video... concise, well paced, extremely well organized and well presented . Great job!
@f44nboy
@f44nboy 2 жыл бұрын
Nothing to add to that!
@twoonswig3667
@twoonswig3667 Жыл бұрын
I've just gone mental trying to do this using stack, gpt and other videos. Gonna have some trouble with databases trying to get the modal to reflect the information relevant to which image was clicked but hopefully a bit of python can sort it out. You're such a good creator, 10 stars
@glensrb4723
@glensrb4723 5 жыл бұрын
Perfect timing! Was looking for a modal solution to a login form and this is just perfect. Thanks mate! :)
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Glad I could help.
@shamana-om
@shamana-om 3 ай бұрын
Thank you for this great tutorial! I've been looking for a video like this for a long time already and had many uneffective attempts to build a modal on my website. With this tutorial it now all makes perfect sense and the modal perfectly works! Thank you!!
@masterofnan2870
@masterofnan2870 4 жыл бұрын
Dude, you rule. I have been pulling my hair out trying to deal with other modal methods. Thank you!
@timderks5960
@timderks5960 2 жыл бұрын
Kyle, your videos are a true lifesaver. I'm a pretty good coder - for a hobbyist at least, but my CSS knowledge is pretty basic. Because of this, I used to have some complex functions to handle button clicks on elements that have children, since the target of the event can be either the clickable element, or one of its children. If only I knew about pointer-events sooner, that could have saved me so much time! There's a lot of great JS and CSS content out there, but in the last couple of years, I've always come back to your videos. Thanks for all the effort!
@jjwebb15
@jjwebb15 3 жыл бұрын
Came here for the modal turotial, left with a lorem shortcut. Gotta love it!
@dan1523
@dan1523 4 жыл бұрын
Hey bro, I just wanna say that Your vids have really helped me understand some concepts that I had a hard time grasping in my bootcamp. keep up the great vids!
@danbuild977
@danbuild977 4 жыл бұрын
Absolute Fire in 15 minutes. Your videos are incredible, and super easy to follow. Thank you.
@masterchief9148
@masterchief9148 2 жыл бұрын
Honestly, you're my favorite dev youtuber ! Each details are explained extremely well and without search your word !
@MRAMetharam
@MRAMetharam 2 жыл бұрын
This content is golden! Not only is it short and direct to the point, but it also shows off a lot of very useful techniques! It is very seldom that I come across videos like this! Thanx for being awesome and sharing this!
@deniskomarov189
@deniskomarov189 3 жыл бұрын
Maybe it's just me but if you'd like to code along 0.75x speed seems to work well. Helped to not only keep up but also better understand how & why each line was being used. If you can make peace with the slightly slower commentary. Great job!
@Fatfingertunes
@Fatfingertunes 3 жыл бұрын
Excellent! And far more sophisticated than I would have done myself... really appreciated.
@sanjaymahto5825
@sanjaymahto5825 3 жыл бұрын
You are justifying the name of this channel. thanks 🙏
@aram5642
@aram5642 3 жыл бұрын
The modal dialogs are complex matter on various levels (template abstraction, vertical scrolling, responsiveness, focus, tabindex, etc), but this tutorial is a good starting point. Never ever though remove css outlines from focusable elements - for the sake of accessibility.
@abhirammadhu2973
@abhirammadhu2973 2 жыл бұрын
This is so perfect and well explained. All the modal popups that I have check, they make it over complicated.
@Aweheid
@Aweheid 2 жыл бұрын
Wow! your way of teaching is amazing! it's straightforward, explains everything directly in short words, is well presented, prepared, and very very clean and organized. Thanks, many many thanks.
@Ai4698
@Ai4698 Жыл бұрын
I tried it by myself at first but yours looks so much better. Also never heard of data-* until this video
@adamjamiu6764
@adamjamiu6764 3 жыл бұрын
Thanks, kyle. I don't know how I will appreciate your efforts. you made me understand how I will put my javascript skills into real-world projects
@daalwada
@daalwada 4 жыл бұрын
You can build bootstrap v6.0 alone.. popup, accordions, this and that.. and you have no idea how much knowledge you have man! 😄
@silverbell6160
@silverbell6160 3 жыл бұрын
Wow! I looked for something like this all afternoon. I have some modals that i need to close programatically ! All i found was jquery options. I wanted to use vanilla js. Thank u! Well explained, to the point.. great ⭐⭐⭐⭐⭐
@greenfigure3941
@greenfigure3941 4 жыл бұрын
Thank you! I was looking for something like this and you helped me really much with my popup for my chrome/firefox extension. Without you, I would have skipped it completely and only used boring html headers inbedded in the site which would've looked awful and barely worked.
@V.Z.69
@V.Z.69 4 жыл бұрын
Pretty good. It just drives me crazy that you didn't use a single semicolon in JS.
@sfoxj
@sfoxj 2 жыл бұрын
I don’t use semicolons😊
@abhilashLeader_07
@abhilashLeader_07 2 жыл бұрын
I use but it is not mandatory....i dont know y 🤣🤣🤣
@ahndeux
@ahndeux 2 жыл бұрын
Holy moley. That is a lot of work to create a modal.
@MYount
@MYount 3 жыл бұрын
the official Kyle pop up. I got so much from this video thanks. I love the way you popped up in the beginning. lol
@MickenCZProfi
@MickenCZProfi 3 жыл бұрын
Thanks, this is very helpful and simple to understand. A lot of the code can be avoided if you are triggering the popup on some event and not a button (in my case when you lose in the game).
@ismailmunyentwari3752
@ismailmunyentwari3752 Жыл бұрын
Thank you bro 👊.... I was wondering the way I will create my own modal without Bootstrap. But now you turned me to it .
@jaydenmoon1165
@jaydenmoon1165 2 жыл бұрын
That was an awesome tut as always! - lol needed a refresher on this topic, thank you !
@starleaf-luna
@starleaf-luna 3 жыл бұрын
7.8 billion people should be subscribed to you
@okoliginikachukwu6036
@okoliginikachukwu6036 4 жыл бұрын
Pretty straightforward and beginner friendly. Great job! Only issue I'm having is that the modal is triggered on page load instead of on button click. Pls what should I do
@dannyezechukwu1175
@dannyezechukwu1175 Жыл бұрын
Great video. This helped me a ton! This channel is awesome!
@ronpalmer7260
@ronpalmer7260 Жыл бұрын
This threw me for a loop in the js: const overlay = document.querySelector("#overlay"); in yours, you have ("overlay") without either an id or a class indicator and you didn't set the class on the overlay to overlay. I was getting NULL for overlay and it took me a while to figure it out. But I'm a newbe to javascript and I learned a bit figuring it out. Its working great and I understand it much better now. Thanks.
@danny_the_K
@danny_the_K 5 ай бұрын
I know this is old, but thank you for keeping this up on KZbin... This is the 1st great explanation of opening/closing a child window (modal) in Javascript... I have been searching for this for a week and watching poorly done and overly hyped videos that are worthless... no explanations of why/what they are doing. I have one question which I will now have a code base to work from, Can I open a link into a DB for a submission form in this modal... I am building a landing page for a new project and want to offer a signup for more info type modal... I think this gives me the knowledge I needed to work with.
@katkodes6055
@katkodes6055 2 жыл бұрын
You have the best videos! So grateful
@bonguthandokhumalo7552
@bonguthandokhumalo7552 4 жыл бұрын
Thanks a lot, man, your videos are always helpful. Keep up the good work.
@thedesignerdeveloper8205
@thedesignerdeveloper8205 4 жыл бұрын
Thank you for the tutorial! I just subscribed so I'll definitely be watching more of your tutorials.
@roanmaravillo9895
@roanmaravillo9895 3 жыл бұрын
Thanks kyle you really helped me on my project looking for a carousel tutorial in the future.
@gifbfbvhvhdhfhfjffjfnfhfb515
@gifbfbvhvhdhfhfjffjfnfhfb515 2 жыл бұрын
bes tutorial ive ever seen and you show the code when youve done . ill give you a cheeky sub
@ligmadick3401
@ligmadick3401 4 жыл бұрын
I can recommend to place the close modal button at the top right with the following css: position: absolute; top: 0; right 0; So it is independent from the modal header in case you are not using flexbox for it.
@sarvij9870
@sarvij9870 Жыл бұрын
You are the best, awesome explanation, step by step , ty
@alexjulius69
@alexjulius69 2 жыл бұрын
Yes! This is precisely what I need for my software, thanks
@mattmelester8929
@mattmelester8929 Жыл бұрын
Another great job (as usual). Thanks.
@shvideo1
@shvideo1 3 жыл бұрын
A great behaving modal and great technique as well. Great job. Thank you.
@pixelum2023
@pixelum2023 2 жыл бұрын
Very interesting! I'll definitely incorporate that into some of my projects!
@thmasibsirinzad3693
@thmasibsirinzad3693 5 жыл бұрын
Thank you for sharing this code. i have been searching modal pop code for a long time, finally i found what i wanted
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm glad I could help!
@rahalmehdiabdelaziz8121
@rahalmehdiabdelaziz8121 2 жыл бұрын
Great video as always, if you add comments on the code it should be perfect
@grownmancrying
@grownmancrying 5 жыл бұрын
Man you rock! Thanks again for this one. Keep up the great work!
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Thank you!
@bikramchettri9405
@bikramchettri9405 5 жыл бұрын
Thanks mate. Your tutorials are precious. If you can do a video on throttling and debounce it will be very helpful.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm really glad my videos help. Debounce is a fairly technical and advanced topic, which I generally believe is done better through text. That said, I will look into seeing if I can figure out a good way to teach that concept through video.
@bikramchettri9405
@bikramchettri9405 5 жыл бұрын
@@WebDevSimplified Thanks for the reply.
@DejanPavlovic-tu8vj
@DejanPavlovic-tu8vj Жыл бұрын
Thank you so much,so much i learned from this video.. Thank you again! Hope one day ill make this easy like you... Thanks !!!!
@failking888
@failking888 4 жыл бұрын
mAAAAn, thx I'm making the project and had some troubles and ur video solved it, big thx u)))
@MYount
@MYount 3 жыл бұрын
Hello Kyle can you do a quick video on multiple buttons opening different modals?...nevermind I just figured it out from the video, thanks for the great video.
@carolineyorke3651
@carolineyorke3651 3 жыл бұрын
hey what did you do? I want to do the same thing
@AcceleratedExpansion
@AcceleratedExpansion 3 жыл бұрын
@@carolineyorke3651 Same here
@Sevenstarz1216
@Sevenstarz1216 2 жыл бұрын
Man I've been searching for the solution! Please help!
@Sevenstarz1216
@Sevenstarz1216 2 жыл бұрын
Just figured it out!
@siddarthkotthur1558
@siddarthkotthur1558 4 жыл бұрын
bro u deserver million more subscribers!
@oteror
@oteror Жыл бұрын
Great tutorial! Easy to follow.
@mikeistp5736
@mikeistp5736 5 жыл бұрын
lol The start. pressed like since this video is simple and understandable for me, the nub one. Well, the activity(how's he jumps in a html-tree) of JS is a mystery for me at this moment. Hope will find out very soon to understand the 'shit' on a new level.
@lazarzbiljic4903
@lazarzbiljic4903 3 жыл бұрын
OMG... you save my life bro, tnx!
@gandharvakalia
@gandharvakalia Ай бұрын
thanks sir for such a understanding concept and video
@JorgeRivera-rp1zw
@JorgeRivera-rp1zw 3 жыл бұрын
tHANKS TO SHARE THIS VIDEO WAS AWESOME..! AND VERY USEFULL..! PLEASE DO IT MORE...! SUCCEEDS..!
@detoxfi5926
@detoxfi5926 Жыл бұрын
Thank you for the great video. can you make a video explaining how to get those pop-up triggers such as time and intent to exit
@bonganimkhaliphi8695
@bonganimkhaliphi8695 3 жыл бұрын
Excellent Tut. Enjoyed it very much
@stratokrat6290
@stratokrat6290 5 жыл бұрын
High quality content. Well done and thank you!
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Thabk you. I'm glad you enjoyed it.
@pascalgoldmann6429
@pascalgoldmann6429 2 жыл бұрын
Thank u my friend! Very Strong tutorial
@calvinlee4346
@calvinlee4346 2 жыл бұрын
fantastic tutorial! The issue I have been having is creating multiple Modals for my page.
@gagiknavasatariyan7316
@gagiknavasatariyan7316 4 жыл бұрын
It is really helped me. Great work
@jenniferhayward1137
@jenniferhayward1137 2 жыл бұрын
I have your code identically set-up and mine will not display like yours. what am I doing wrong??? I mean exactly. still no modal will display. What am I missing
@naie_1001
@naie_1001 3 жыл бұрын
you are a lifesaver, thank you so much!!
@latinwarrior01
@latinwarrior01 3 жыл бұрын
Excellent code sample and explanation! Thanks for putting this video together. I will subscribe to your channel.
@binihalex8097
@binihalex8097 3 жыл бұрын
I don't care about the mic. Awesome clip!
@hamman794
@hamman794 3 жыл бұрын
Thanks from Ukraine! Good tutorial! )
@leavill1209
@leavill1209 Жыл бұрын
I dont know if anyone will see this but I was wondering if instead of a button you could use an image to open the modal?
@ximb2005
@ximb2005 Жыл бұрын
hey, yeah its possible, right now I made a group of images that when u click the modal open
@jc19438
@jc19438 3 жыл бұрын
I don't understand why #overlay is the correct property to use to click outside the modal and close it. Wouldn't a click event for overlay listen for events on the entire screen. As I'm writing this I'm realizing that it may be something with the overlay div being on the outermost html.
@PiotrSygutPL
@PiotrSygutPL 2 жыл бұрын
Great job - thanks 👍
@olegfare4625
@olegfare4625 2 жыл бұрын
you scared me at the beginning!
@ben8140
@ben8140 2 жыл бұрын
Great tutorial!
@KeeveSinger
@KeeveSinger 2 жыл бұрын
Awesome explanations! Quick question. What is the 'live server' you were referring to? How can I use it?
@jivanmainali1742
@jivanmainali1742 4 жыл бұрын
Bro pointer-event :none does make everything insensitive to touch or click event but when you use this property it is able to click a button and if we use z-index instead of event-pointer then still button is non clickable .why?
@Konstantah888
@Konstantah888 5 жыл бұрын
Great channel, keep it up! Glad that I found your tuts. The only one thing which makes me crazy is your fast speech like it’s pretty ez pz lol.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm glad you are enjoying the tutorials. If I am speaking too fast you can slow down the video to .75 speed and that may help.
@Konstantah888
@Konstantah888 5 жыл бұрын
No worries, that’s fine mate. I’ve already started slowing it down. Hope to see some crash courses from you soon.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
@@Konstantah888 I have quite a few crash courses on the channel already for various technologies. My video for tomorrow is going to be a bit of a crash course on building a REST API with Node.js as well.
@worldlyemo2290
@worldlyemo2290 Жыл бұрын
This is an awesome video, thank you so much for the help. Ive had the peculiar problem, that the close button disappeared after exactly 4 times of opening the modal. It isn’t really that important for my application, but I still found it a bit strange
@lukabubnjevic5126
@lukabubnjevic5126 4 жыл бұрын
exactly what i was looking for!
@Jimbo-zd8cz
@Jimbo-zd8cz 4 жыл бұрын
nice tutorial! heads up to anyone using bootstrap tho! the classes clash and need changed
@JoeShmo-1234
@JoeShmo-1234 5 жыл бұрын
That was clear and concise, personally I'm used to jQuery but thank you nevertheless
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm glad you enjoyed it. I generally try to stay away from jQuery since you can do nearly everything jQuery did with plain JS now.
@JoeShmo-1234
@JoeShmo-1234 5 жыл бұрын
@@WebDevSimplified fair, and i agree - jQuery is JS after all
@gindevgin9298
@gindevgin9298 4 жыл бұрын
i really love your contents! thanks!
@wickedgabrugamer
@wickedgabrugamer 5 жыл бұрын
love your explanation man..
@alanrobbo6980
@alanrobbo6980 3 жыл бұрын
This is Fantastic, Thank You.👍
@leochannel1189
@leochannel1189 5 жыл бұрын
Thank you so much! You helped a lot and explained perfectly!
@xylesx
@xylesx 5 жыл бұрын
Love this! Thank you for this. ;) Learned a bunch.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Thank you. I'm glad you enjoyed it.
@JamesHalpert8555
@JamesHalpert8555 4 жыл бұрын
Great tutorial...but kindly explain the CSS properties and javascript code a little slowly.Thank you:)
@JacoblBroughton
@JacoblBroughton 4 жыл бұрын
Thank you so much, man. Great, informative tutorial.
@frankdambra1810
@frankdambra1810 2 жыл бұрын
Very elegant. For some reason though even after setting very high z-indexes for the various elements Wordpress is still putting wooCommerce elements and the footer over the modal. Weird.
@repenning1
@repenning1 Жыл бұрын
If you would do this project again would you use ?
@aufantaufiqurrahman2794
@aufantaufiqurrahman2794 Жыл бұрын
alhamdulillah, thank u very much!
@SH-lt2iv
@SH-lt2iv 4 жыл бұрын
Very good tutorial learned alot thanks!
@mwutal9051
@mwutal9051 4 жыл бұрын
Nice videos! Really appreciated! Just started with Web Dev and still struggling with JS. Any recommendation which path to follow? Greetings from Germany!
@juangabriel2559
@juangabriel2559 4 жыл бұрын
Great video bro, thank you!
@0119325
@0119325 5 жыл бұрын
If we create two modal buttons the functions does respond to eachone so that's the purpose of selector forEach?
@kurtcamarines9481
@kurtcamarines9481 3 жыл бұрын
Any clue how to loop through all the other button and close the active ones before opening a new one?
@oscarleon3008
@oscarleon3008 4 жыл бұрын
Just what I need, perfect!
@robschlette4317
@robschlette4317 2 жыл бұрын
This was super helpful. I'm failing to config an event listener for the escape key to call closeModal. Any tips?
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 666 М.
How To Build Sortable Drag & Drop With Vanilla Javascript
22:22
Web Dev Simplified
Рет қаралды 337 М.
Create a Simple Popup Modal
19:25
RichardCodes
Рет қаралды 335 М.
Create a Modal (Popup) with HTML/CSS and JavaScript
10:01
Florin Pop
Рет қаралды 135 М.
Build A Quiz App With JavaScript
26:59
Web Dev Simplified
Рет қаралды 445 М.
dialog = the easiest way to make a popup modal
9:40
Kevin Powell
Рет қаралды 196 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 489 М.
Build A Calculator With JavaScript Tutorial
38:50
Web Dev Simplified
Рет қаралды 1,5 МЛН
JavaScript Tutorial | Creating a Modal with JavaScript | Part 1
19:44
How To Make A Popup | HTML, CSS & JavaScript
16:52
Web Dev Made Easy
Рет қаралды 17 М.
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН