blob: 08ef7563a873a46692e0245af537581a9e7bb8ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Bitty scrolling links script
$('a[href^="#"]').click(function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: $(this.hash).offset().top
}, 500);
$("#nav-menu").removeClass("is-active");
return true;
})
// 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) {
$('.modal.is-active').removeClass('is-active');
}
});
|