javascript - Close modal by clicking outside of it, pressing escape, or pressing the closing X in the corner -


I have a modal dialog that I can click outside of it, by pressing escape or in the closing x corner.

I already have a pressing X in the corner. Just need others

I am using Bootstrap 2.3.2, and jQuery 1.9.1

My JSField is here:

I have

CSS:

  .modalDialog {status: fixed; Font-family: aerial, helvetica, sense-serif; Top: 0; Correct: 0; Bottom: 0; Left: 0; Background: RGBA (0,0,0,0.8.8); Z-index: 99 999; Opacity: 0; -Winkit-Infection: Opacity of 400ms easily; -Moz infection: Opacity of 400ms easily; Transition: Opacity in 400ms easily; Pointer-phenomena: none; } .modalDialog: Goal {Opacity: 1; Indicator-incidents: Auto; } .modalDialog & gt; Div {width: 400px; Status: Relative; Margins: 10% auto; Padding: 5px 20px 13px 20px; Range radius: 10px; Background: #fff; Background: -Mo-linear-shield (#FFF, # 999); Background: -webkit-linear-shield (#FFF, # 999); Background: -O-linear shield (#FFF, # 999); } .closeModal {background: # 606061; Color: #FFFFFF; Line-height: 25px; Status: Completed; Correct: -12 pixels; Text align: center; Top: -10px; Width: 24px; Text-decoration: None; font-weight: bold; Webkit-boundary-radius: 12px; -image-radius: 12px; Boundary-radius: 12px; -Moz Box-Shadow: 1px1px3px # 000; -WebKit-Box-Shadow: 1px 1px 3px # 000; Box-Shadow: 1px 1px 3px # 000; } .closeModal: Hover {background: # 00d9ff;}  


Comments