Later in my experiments I found out this cannot be done with CSS only, because of the line element. The unique feature of the modal box is the fact that it disables the main window in the browser but keeps it visible, with the modal window showing as a child window in front of the web. For my project, I need a card with information to open when a line from a table gets a click. We do this by creating an a tag, adding a closeBtn ID to it and creating an onclick event handler that references the function that closes the modal. When you click in something, it opens a window with information. Lastly, we created a function called removeCustomAlert() to close the modal box.We did something similar to the body of the modal, by creating a p tag and assigning a text node to it. Thank to pop me out of that button, but now im done so you can close this window. The titleAlert text variable is then appended to the h1 tag to show the "It Pops!!!" message.Popup/Modal Windows without JavaScript.
0 Comments
Leave a Reply. |