I want to create my own simple alert dialog with jQuery. Two problems: how do I disallow people to click on any elements in body before user clicks OK button in alert? And, how to make body all dark except one element? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Place a div with partial opacity over all content. Typical CSS:
Now place a positioned div, the dialog box, over the .cover div, and give this dialog a higher z-index.