Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-07-11 10:56:40 +0300
committerHanzei <hanzei@mailbox.org>2018-07-11 10:56:40 +0300
commit2b5737740988a21a68df0386f5e7f7f480d32da8 (patch)
tree800ee6de0c9008926669605c9241cad637fadc57 /static
parent297ac040157d3a66c02c430d7e54379219e6c124 (diff)
Prevent scrolling when modal is open
Fixes #46
Diffstat (limited to 'static')
-rw-r--r--static/js/index.js2
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) {