Browse code
allow option to close modal on click
fiddlerwoaroof authored on 01/07/2015 02:55:40
Showing 2 changed files
Showing 2 changed files
... | ... |
@@ -18,9 +18,12 @@ |
18 | 18 |
wrapper.removeClass('open'); |
19 | 19 |
currentModal = null; |
20 | 20 |
}); |
21 |
- modal.click(function(ev) { |
|
22 |
- ev.stopPropagation(); |
|
23 |
- }); |
|
21 |
+ |
|
22 |
+ if (! target.hasClass('close-on-click')) { |
|
23 |
+ modal.click(function(ev) { |
|
24 |
+ ev.stopPropagation(); |
|
25 |
+ }); |
|
26 |
+ } |
|
24 | 27 |
} |
25 | 28 |
$(this).click(function() { |
26 | 29 |
if (action === 'open') { |