So cool. I dont understand one thing on the last function. Why we target the model-parent function. I thought that we should target section because when we click on the section, the modal disappear. I dont understand this :(
because then if we clicked anywhere on the screen the modal will disappear, even if we clicked on the main modal (the white box with the text), even if we clicked there the modal will disappear
watch another another fun project on how to make keyboard shortcuts with javascript in 8 min (hotkeys) => ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XJohoWGOv0k.html
Oops that was a mistake. didn't notice it until now, thanks. so when there is position absolute, there is no neeed to position it relative because it is relative by default. like... when the parent element is absolute, if the child is absolute, it will be positioned relatively to its parent even though the parent doesn't have '"Position: relative" but just because it has absolulte, that makes it relative as well, hope you get it. thanks for letting me know.