Create a Simple Popup Modal

  Рет қаралды 335,328

RichardCodes

RichardCodes

Күн бұрын

Пікірлер: 496
@RichardCodes
@RichardCodes 4 жыл бұрын
Learn to make a mobile responsive menu - kzbin.info/www/bejne/jH7bgWyGgriCj68
@downjoan313
@downjoan313 3 жыл бұрын
Judul Video Bahasa Indonesia?
@DeepDivewithAliAbdaal
@DeepDivewithAliAbdaal 8 ай бұрын
Good stuff
@tigredejadeec
@tigredejadeec 2 жыл бұрын
Not every programmer knows how to teach, so when I come across someone who does it really good like you do, I have to let them know! Thank you very much
@tiqo8549
@tiqo8549 3 жыл бұрын
Dude...the way you "speak" of the elements to be "alive" and talking to each other makes this even better to understand than any other tutorial i've ever seen. The parent talks to the child...works for m!
@RichardCodes
@RichardCodes 3 жыл бұрын
Thanks man, Yeah I think teachers can get too far removed from the student, you need to have empathy and understanding of your student. thanks mate.
@TraversyMedia
@TraversyMedia 6 жыл бұрын
Great job Richard, very helpful
@RichardCodes
@RichardCodes 6 жыл бұрын
Traversy Media thanks brad. You’re an inspiration.
@poonamjagtap8392
@poonamjagtap8392 5 жыл бұрын
O
@battlefist6884
@battlefist6884 5 жыл бұрын
@richardcodes and @traversy good job for helping me out
@cinquain0
@cinquain0 5 жыл бұрын
from the master himself
@bk._550
@bk._550 4 жыл бұрын
Traversy Media thanks brad. You’re an inspiration.
@joelyoungberg1154
@joelyoungberg1154 5 жыл бұрын
Great Tutorial! Very nicely done and clear - Note: for the JQuery users out there the button code would look something like this (depending on your class and id names) : $(document).ready(function(){ // Change modal background from none to flex to show it $('#modal-button').click(function(){ $('.bg-modal').css('display', 'flex'); }); // Change modal backround to none to hide it when x gets clicked $('.modal-close').click(function(){ $('.bg-modal').css('display', 'none'); }); });
@vijayakumar_3
@vijayakumar_3 5 жыл бұрын
thank you
@Chitranshleo
@Chitranshleo 2 жыл бұрын
Brilliant Richard.. It's been several months that I have watched any video at normal speed. Especially liked how you explained the code rather than just writing it.. Thank you.
@matthewcooper1683
@matthewcooper1683 2 жыл бұрын
It’s amazing the fact you actually tell us what the code does makes us actually understand it
@henryrobledo8365
@henryrobledo8365 5 жыл бұрын
Finally, instructions for a simple modal clear and to the point. Thanks great tutorial.
@williamb8162
@williamb8162 4 жыл бұрын
What a fantastic lil' video! One of the best I've watched on coding in a long time, maybe ever. Thanks!
@briankelley2920
@briankelley2920 2 жыл бұрын
Love the wonderful popup contact form. Help me out a lot. Thank you RichardCodes!
@Darkest-Kn1ght
@Darkest-Kn1ght 11 ай бұрын
Richard, thank you so much, I'm JUST getting into javascript and so far it's been a tremendous struggle! I've been through a dozen tutorials on youtube and wasn't able to get this to work. I managed to get your tutorial working after figuring out where to put the link to the javascript file. I've seen some links in the head of the html file and some at the bottom of the html body, so never knew exactly where to put it. It works at the bottom of the body tags in the html though!! Thank you so much!!!
@RichardCodes
@RichardCodes 11 ай бұрын
Glad to help. The rule is to put at the bottom. This is because the page loads top to bottom. So if the html element you want to manipulate with JavaScript hasn’t loaded yet it won’t work. This would be the case if JavaScript came before html.
@ranjitasingh
@ranjitasingh 5 жыл бұрын
I will recommend you to use position : fixed in place of position: absolute; with z-index: 2; Example- .bg-modal { Position: fixed; Z-index: 2; }
@devbytoast
@devbytoast 4 жыл бұрын
bro any suggestion I can open my modal only in one button other buttons with the same id will not trigger the modal. thanks!
@shazbaz5695
@shazbaz5695 4 жыл бұрын
@@devbytoast I'm stuck there too. Did you find the solution by any chance?
@antwarior
@antwarior 5 жыл бұрын
bro i swear in just a few words, youve taught me javascript out of all the tutorials i watched, this was the most explanatory one, never new document meant look on page and the way you explained it i fell now i can go code anything i want
@RichardCodes
@RichardCodes 5 жыл бұрын
Thanks for the kind words, glad I could help mate. Javascript is a real mother. Still it kicks my ass every day. Just keep going mate.
@samuelbaseke5305
@samuelbaseke5305 2 жыл бұрын
Best Tutorial and the best teacher.
@vietnguyenc6612
@vietnguyenc6612 5 жыл бұрын
omg, I have to say the best coding-teaching video ever. Please keep doing this, I need more, Thank you very much
@kennedyrmenezes
@kennedyrmenezes 4 жыл бұрын
Where are you man? Come back! You're awesome.
@suhaibalnaji1220
@suhaibalnaji1220 2 жыл бұрын
im trying to create a booking form that gets displayed when the user log in what should i add
@nitria2549
@nitria2549 5 жыл бұрын
the margin between the input tags not working for me couldnt find out why so i used the tag
@tanjimashraf803
@tanjimashraf803 4 жыл бұрын
Is there any function to make a fancy popup transition through JS?
@rahulkumar-yk2ru
@rahulkumar-yk2ru Ай бұрын
Still watching your videos after 6 years, can't able to find a better lecture than this. A request to you pls make a video on how to make multiple items scrolling horizontally using javascript. 😍. Thanks man
@kislayvats5366
@kislayvats5366 4 жыл бұрын
you are just awsome man.Thank you so much,today i got a clear vision of what happens when you have more than one position="relative" ,stuff on board.Now i'm clear that position="absolute" chooses the nearest parent with relative position tag.Thank you again.Lots of love from INDIA
@StayFlyJW
@StayFlyJW 4 жыл бұрын
You should come back to making tutorials! You’re great at them!
@RichardCodes
@RichardCodes 4 жыл бұрын
your wish is my command, I'm back
@techtutorialsfactory
@techtutorialsfactory 2 жыл бұрын
WoW! This is apt. You are a great teacher. Thanks a million Richard.
@gulnazsharipova3966
@gulnazsharipova3966 5 жыл бұрын
Thank you so much Richard! it was my first javascript. I have seen tons of analogous video here in Russia but no one was as simple and understandable as yours. Though I had some issues, it seems you haven't explained styles for 'button'. But it was minor remark, solved quickly. Overall very helpful video. Thanks again.
@lindatochukwu3081
@lindatochukwu3081 4 жыл бұрын
thank u so much Richard, but i don't know why the bg-modal background is not filling my screen, despite using 100% as height, but the width is very ok of which its 100% too, what do I do?
@Vinomillz
@Vinomillz 2 жыл бұрын
I soo much loved this video... watched lots of popup videos on KZbin on how to create popups but I couldn't understand them... but when I watched this I got it thanks men✊
@lalarukh4751
@lalarukh4751 3 жыл бұрын
Thank you so much Richard!! This helped a lot!! However I am confused(I am a beginner at JS) how did you run the js file with no includes? everything works except for that
@redahammada8605
@redahammada8605 3 жыл бұрын
I know this reply may be a little late but it may help someone else add this before the body tag so that javascript can be able to affect all the elements
@lalarukh4751
@lalarukh4751 3 жыл бұрын
@@redahammada8605 thanks a ton!!! 🙏🏾🙏🏾
@taranjeet9
@taranjeet9 5 жыл бұрын
Do you have any video on how we can connect these forms to collect data? like after clicking on submitting it would send data to MailChimp etc.
@lollilolli4582
@lollilolli4582 2 жыл бұрын
You are a very good teacher, you explain things clearly ! Thank you for this :)
@jhunlyfaderagao1133
@jhunlyfaderagao1133 4 жыл бұрын
I do have a question. In your tutorial you choose to use the button click me whis is actually a button. What if I'm going to use is the navigation SIGN IN at the top of my website whis is actually not a button, it was a list.
@KLXZ_
@KLXZ_ 5 жыл бұрын
I watch plenty of those videos since i'm learning and i find better half of them hot garbage since people don't explain stuff well, they just do it. You did a great job explaining simple things that might be not that simple for someone who is learning and might not know all of even the most basic things. Great job man. Like and sub, keep up the great work!
@1nspir3dx
@1nspir3dx 4 жыл бұрын
I've got a one question. For example, imagine a human, who is disabled (have a bad sight or cannot use mouse) and they are using a key board. When button "click me" will be focused and enter will be clicked, our pop-up will be shown. So the question is, how will those people interact with our pop-up, if other buttons also will be available? Is there any ways to make other interactive elements unavailable when pop-up is shown?
@shadowytv
@shadowytv 4 жыл бұрын
Nice, simple, quick, and instant subscribe.
@RichardCodes
@RichardCodes 4 жыл бұрын
Thanks. A few simple videos coming up, very basic then will start to turn it up a bit. Glad you’re here.
@jeanbravo4543
@jeanbravo4543 4 жыл бұрын
hi richard, how can i perform various manners? Example I have a table with several rows and I want that every time I click on that row I get a modal. I try but it doesn't do anything I guess it's because I use id .. I would appreciate your help
@kennethgonzalez6689
@kennethgonzalez6689 2 жыл бұрын
5 minutes in just wanna say you are an AMAZING teacher thank you so much
@neb542
@neb542 3 жыл бұрын
Very good at verbalizing what you are doing. So helpful thanks
@kundansinghpanwar1113
@kundansinghpanwar1113 5 жыл бұрын
awesome explanation create more please... very very helpful
@godgamer3717
@godgamer3717 3 жыл бұрын
Hey do you know we can add a transition to that popup? Like an animation for when it opens.
@User-li7qx
@User-li7qx 3 жыл бұрын
Hello, Do you have any suggestions on how to add animation to the pop up window? Please.
@MrConway007
@MrConway007 4 жыл бұрын
You sir are an amazing teacher!! First time I watched a video of yours, and I really like your teaching style of explaining how all the moving parts work togther to create the finished result. I really needed to hear this at a time when I also need to create a pop up contact form on a client's website, I am working, and this video will be of incredible help to me when I start coding it tommrow. Thank you Richard.
@RichardCodes
@RichardCodes 4 жыл бұрын
Awesome. Thanks for watching. Good luck man.
@microsurf128
@microsurf128 3 жыл бұрын
Great video! you positioned the modal vertically centred . How do you position the modal , say 50px from the top of the page?
@evelienkulikova8825
@evelienkulikova8825 5 жыл бұрын
That's a very clear and handy bunch of instructions. Thanks for helping me out! :)
@edgarhuemacsanchezhernande9776
@edgarhuemacsanchezhernande9776 5 жыл бұрын
I have a problem... when I try to do the first JavaScript function, it just opens the login bg-modal for an instant, an then it hides again. any solution? :c
@frankkj1995
@frankkj1995 5 жыл бұрын
The same thing happened to me, did you surround your submit button within a form? Because when I took it out of the form and took out the submit type for the button it worked. It must be something to do with the HTML request associated with the button refreshing the page I assume.
@franciscopena1140
@franciscopena1140 4 жыл бұрын
I had the same issue. I had a link with href=" ". Writing a "#" instead of " " did the trick.
@epizone
@epizone 3 жыл бұрын
nice one Richard, am practising doing it
@Arjunarjunskiy
@Arjunarjunskiy 3 жыл бұрын
Thank you! The way you explain things is very very helpful.
@photoinshot1355
@photoinshot1355 2 жыл бұрын
Great tutorial, very well explained, thanks.! Just one question when using php to handle errors how would you get the modal to open on the redirect from php?
@JPBJJ801
@JPBJJ801 2 жыл бұрын
If you read your comments still @RichardCodes I come to this video so much, its so incredibly helpful beyond just Modals
@RichardCodes
@RichardCodes 2 жыл бұрын
I do. Thank you Jeff. I’m glad to hear it helps you
@naie_1001
@naie_1001 3 жыл бұрын
Thank you so much!! I've been looking for a video like yours! And the way you desrcibed JavaScript was splendid and was easily understandable, thank you thank you!!
@BugArray
@BugArray 2 жыл бұрын
Awesome stuff . I am going to implement this in Angular on my youtube channel
@wduandy
@wduandy 3 жыл бұрын
This video pumped my project a lot! It was the base for all the popups that i'll need! Thanks a lot my dear sir!
@ulemukawelama431
@ulemukawelama431 5 жыл бұрын
Thanks Richard, this is what I have been looking for...this is great.. God bless you
@seemaalam3127
@seemaalam3127 3 жыл бұрын
omg!! wt an explanation dear.I became ur fan. Add more n more videos.
@kingchavez152
@kingchavez152 4 жыл бұрын
Hey I really enjoyed your video. Any idea how I could validate the required text before setting display to none?
@RichardCodes
@RichardCodes 4 жыл бұрын
search html5 input validation, thats a quick and easy way, if not there are some libraries to help
@safehaven1414
@safehaven1414 5 жыл бұрын
Can I ask something? Where did you save your javascript? Is it external or you include it in your html file?
@axelandru9346
@axelandru9346 Жыл бұрын
Good explanation method and very patient attitude !!!
@lfcorullon
@lfcorullon 5 жыл бұрын
Awesome, Richard. That's exactly what I am looking for! Thank you so much for sharing!
@itsmereitumetse
@itsmereitumetse 3 жыл бұрын
Very helpful. I was also able to understand the purpose of some properties which I did not know exactly why I was using them.
@gvd1024
@gvd1024 3 жыл бұрын
I threw the text from your links into VS Code and it threw a bunch of errors. Mostly due to Style Definitions within other Style Brackets...??? i.e. header { ... other properties ... img { width: 30px; } } I'm new to learning CSS/HTML, but I can't find anyone anywhere that talks about having a style within a style...?
@AlisonDurazo
@AlisonDurazo 6 жыл бұрын
I am currently stuggling with this project. it works on the demo page when I add a video inside the pop up box, when I transfer it to my webpage using my style sheet I have on now, the video autoplays and there is no button to click to make it pop up.
@israelemmanuel7905
@israelemmanuel7905 2 жыл бұрын
you are really an amazing teacher......you just saved my little ass. Thanx to you sir
@newgenerationxpro3379
@newgenerationxpro3379 5 жыл бұрын
this really helped me with my site that I am working on just for practice, thank you :)
@sanatr9181
@sanatr9181 4 жыл бұрын
It helped me a lot. I subscribed to your channel the moment you showed that modal
@DUST35
@DUST35 4 жыл бұрын
Remember to put in a reference to the .js file in the html code (was my fist website using javascript so I didn't know about it);
@hiryuimajin
@hiryuimajin 5 жыл бұрын
I just didn't learn about making this awesome modal popup but I also got a lot from the css part of this tutorial. Thank you very much!
@MrBulat1
@MrBulat1 Жыл бұрын
Thanks a lot for your video. Your lesson helped me to create modal popup window! Have a good day!
@googleuser4257
@googleuser4257 5 жыл бұрын
Great tutorial! As a javascript and CSS beginner, how could i achieve the modal to pop up once the page has loaded with a few seconds in delay?
@zaeemAtif
@zaeemAtif 3 жыл бұрын
so much love man..!! You made my day.!!! :)
@ivogeorgiev4245
@ivogeorgiev4245 4 жыл бұрын
Awesome video mate, thumbs up. For some reason, using the class of modal-content was not allowing me to change its width. If this is an issue for someone else, just change the name of the class.
@jmmacatangay_grizzlybear
@jmmacatangay_grizzlybear 5 жыл бұрын
WHY ARE YOU NOT MAKING ANY MORE VIDEOS?
@angadbhambra6914
@angadbhambra6914 5 жыл бұрын
Very helpful and easy to understand thanx Richard for making it look so easy.
@ahmedmujtaba209
@ahmedmujtaba209 4 жыл бұрын
Hey, I need this type of popup form when I go to close the tab, it should not allow me to close the tab, unless I fill the details in the form, is it possible?
@No-tt2tz
@No-tt2tz 4 жыл бұрын
I didn't understand one thing... How the login button and popup form are connected? I mean did we write any line when we'll click on login button only then popup form will open
@wiktor7992
@wiktor7992 4 жыл бұрын
This tutorial is Great! However, I am having a problem aligning the text inputs and the image
@ishaanpandey
@ishaanpandey 3 жыл бұрын
same problem
@christophersakwa1625
@christophersakwa1625 2 жыл бұрын
you are a great teacher, thank you for this tutorial. Liked and subscribed my friend!
@anansekrom
@anansekrom 3 жыл бұрын
too helpful, very precise and explanations couldn't have been better.
@polikwalker9468
@polikwalker9468 4 жыл бұрын
Hi. Please, tell how to make this modal window to close by esc and clicking around the modal window. Hope you will see it
@hsuyihnin7398
@hsuyihnin7398 2 жыл бұрын
so useful!!!! U really know how to teach clearly. Thank u mr.
@ChapCanai
@ChapCanai 3 жыл бұрын
Best tutorial I have come across in life
@RichardCodes
@RichardCodes 3 жыл бұрын
Thanks man, I massively appreciate the kind words
@essaalu7047
@essaalu7047 2 жыл бұрын
great job mam, keep goimg 👏👏👏
@RobertDigitalArtist
@RobertDigitalArtist 6 жыл бұрын
Nice, great tut and presentation. Is the CodePen working correctly? Because when I opened it, the modal content was already there, down the page, and nothing happened wen clicking on the 'click me' modal button...
@syedmujeebh6661
@syedmujeebh6661 4 жыл бұрын
Nice one. Please make more videos on html , css , javascript
@sasayaki
@sasayaki 6 жыл бұрын
This helped me out on a project I just turned in for an online course. You explained it really well. Thanks so much!
@RichardCodes
@RichardCodes 6 жыл бұрын
Glad I could help
@BichaelStevens
@BichaelStevens 5 жыл бұрын
ok cool but how did you connect the javascript? im not working in codepen and im doing this in php
@trendandviralnews
@trendandviralnews 5 жыл бұрын
You are my new hero! Well done, an easy video, very helpful, understood by me, a simple newbie italian! ;) P.S.: you have a new follower! Keep it up
@sivuyileparkies2643
@sivuyileparkies2643 6 жыл бұрын
I have done a complete modal with a working "register" button with error handlers, when you click on register it sends the user's data to the database. The problem that I have is that every time when the user clicks on the "register" button the modal disappears as if one has clicked the close button(X). how do I make it to only close the modal when one only clicks on the close button not the register button? Thank you.
@alanhasan2898
@alanhasan2898 5 жыл бұрын
How do you then process and save the data that goes into the form. (I'm using Java FYI)
@Arghya_10
@Arghya_10 3 жыл бұрын
This is really helpful. By the way, Is there any kind of code, which will help me open and close the modal using the same button? and can this modal be triggered via link?
@makikon4333
@makikon4333 3 жыл бұрын
Omg, this is one of the most well explained tutorial ! Thanks!!
@alf58580
@alf58580 4 жыл бұрын
For me when i click the button on my webpage the modal opens for like 1 second help! Edit: I fixed it by copying the html from the codepen in the description, but the close dosent work
@puekbislayer
@puekbislayer 4 жыл бұрын
I'm having the same problem! I'm going to look into it but hopefully someone has an answer soon EDIT: I fixed my issue by adding a "#" to the href component of my open link. Without it the page just kept refreshing.
@TheirSavior
@TheirSavior 2 жыл бұрын
beautifully explained. easy to follow along
@thirupathisanthosh6414
@thirupathisanthosh6414 3 жыл бұрын
thanks bro....the way u teach is awesome. You are an insipiration!!!
@arpitsrivstva
@arpitsrivstva 2 жыл бұрын
How to make it a working sign up newsletter form, that people could actually click on sign up and they will be included in my mailing list? How to do that?
@KenserNut
@KenserNut 4 жыл бұрын
Hi! Does this work for electron js desktop apps? Mine doesn't seem to work :((
@stefanpfadt4353
@stefanpfadt4353 2 жыл бұрын
WOW! can i make the popup only appear when a specific user clicks on it, e.g. guest?
@ilovenaturesound5123
@ilovenaturesound5123 5 жыл бұрын
How do you make the button actually submit though? For example. in Node.js.
@vojtavlachovsky7763
@vojtavlachovsky7763 5 жыл бұрын
I did everything as he said but the closing + wont work
@AbhishekTiwari-jq8lc
@AbhishekTiwari-jq8lc 4 жыл бұрын
Have u resolved this problem!?
@Narutoquest
@Narutoquest 3 жыл бұрын
Great work buddy Your video is truly clear my dot when I work on it.
@AntonMosin
@AntonMosin 4 жыл бұрын
Does not work for me. My website is a static html/css one. I suspect Richard's code requires some upgrade to my website environments. Spent two hours on it but have not worked out what exactly should I do.. Can you help?
@crazydrifter13
@crazydrifter13 5 жыл бұрын
which software are you using to edit the html and css code?
@vaibhav4081
@vaibhav4081 3 жыл бұрын
Thank you so much Richard! it was my first javascript👍🙏
Build a Popup With JavaScript
16:55
Web Dev Simplified
Рет қаралды 372 М.
dialog = the easiest way to make a popup modal
9:40
Kevin Powell
Рет қаралды 196 М.
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 2,8 МЛН
How To Create A Modal In Javascript and CSS
15:06
developedbyed
Рет қаралды 92 М.
These CSS PRO Tips & Tricks Will Blow Your Mind!
8:48
Coding2GO
Рет қаралды 476 М.
Create a Modal With HTML, CSS & JavaScript
31:27
Traversy Media
Рет қаралды 283 М.
Learn HTML Forms In 25 Minutes
24:56
Web Dev Simplified
Рет қаралды 988 М.
JavaScript Tutorial | Creating a Modal with JavaScript | Part 1
19:44
Create a Modal (Popup) with HTML/CSS and JavaScript
10:01
Florin Pop
Рет қаралды 135 М.
Learn CSS BOX MODEL - With Real World Examples
17:45
Slaying The Dragon
Рет қаралды 144 М.
The New dialog HTML Element Changes Modals Forever
12:09
Web Dev Simplified
Рет қаралды 593 М.
Popup OR Modal Windows without JavaScript || Pure HTML & CSS
9:24
How to create a CSS navigation bar in 6 minutes! 🧭
6:28
Bro Code
Рет қаралды 361 М.