Prevent scrolling when modal is open

Fixes #46
This commit is contained in:
Hanzei 2018-07-11 09:56:40 +02:00
parent 297ac04015
commit 2b57377409
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0

View file

@ -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) {