diff options
author | Hanzei <hanzei@mailbox.org> | 2018-07-11 10:56:40 +0300 |
---|---|---|
committer | Hanzei <hanzei@mailbox.org> | 2018-07-11 10:56:40 +0300 |
commit | 2b5737740988a21a68df0386f5e7f7f480d32da8 (patch) | |
tree | 800ee6de0c9008926669605c9241cad637fadc57 /static | |
parent | 297ac040157d3a66c02c430d7e54379219e6c124 (diff) |
Prevent scrolling when modal is open
Fixes #46
Diffstat (limited to 'static')
-rw-r--r-- | static/js/index.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/static/js/index.js b/static/js/index.js index 195ad57..08ef756 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -11,9 +11,11 @@ $('a[href^="#"]').click(function(e) { // Modal closer $('.card').click(function () { $($(this).attr('data-target')).addClass('is-active'); + $("html").addClass("modal-open"); }); $('.modal-close').click(function () { $($(this).attr('data-target')).removeClass('is-active'); + $("html").removeClass("modal-open"); }); $(document).keypress(function(e) { if(e.which == 0) { |