2018-07-01 08:09:29 +00:00
|
|
|
// 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 () {
|
2018-07-01 11:08:26 +00:00
|
|
|
$($(this).attr('data-target')).addClass('is-active');
|
2018-07-11 07:56:40 +00:00
|
|
|
$("html").addClass("modal-open");
|
2018-07-01 08:09:29 +00:00
|
|
|
});
|
|
|
|
$('.modal-close').click(function () {
|
2018-07-01 11:08:26 +00:00
|
|
|
$($(this).attr('data-target')).removeClass('is-active');
|
2018-07-11 07:56:40 +00:00
|
|
|
$("html").removeClass("modal-open");
|
2018-07-01 08:09:29 +00:00
|
|
|
});
|
|
|
|
$(document).keypress(function(e) {
|
|
|
|
if(e.which == 0) {
|
|
|
|
$('.modal.is-active').removeClass('is-active');
|
|
|
|
}
|
|
|
|
});
|
2018-07-13 08:55:02 +00:00
|
|
|
|
2018-07-13 09:19:48 +00:00
|
|
|
{{ if and .Site.Params.localTime .Page.IsHome }}
|
2018-07-13 08:55:02 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
var time = moment().tz("{{ .Site.Params.timeZone }}").format("h:mm A");
|
|
|
|
$('#time').html(time);
|
|
|
|
})
|
|
|
|
{{ end }}
|