blob: 847d6a4a1eb747b401d37805fc1be644986e9087 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// 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.id+'.modal').addClass('is-active');
});
$('.modal-close').click(function () {
$('#'+$(this).parent('.modal').get(0).id+'.modal').removeClass('is-active');
});
$(document).keypress(function(e) {
if(e.which == 0) {
$('.modal.is-active').removeClass('is-active');
}
});
|