Is there an option in the bootstrap modal to trigger the event if the user clicks outside the dialog?
For example: I would like to add animated shake css when user click away from modal.
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.
Yes, using the event shown you can fire a new function that when someone click on the body (so outside the modal) you do something.
Remember to add also
event.stopPropagation()to don’t close the modal when you click outside.Here an example: