Web/scripts/main.js

23 lines
651 B
JavaScript
Raw Normal View History

2018-07-24 22:45:53 +02:00
$(function() {
2018-07-28 11:22:20 +02:00
let openModals = function(hash) {
if (hash.length > 1) {
if (hash === '#impressum') {
$('#impressum-modal').modal('show');
} else if (hash === '#glimmers') {
$('#book-modal').modal('show');
}
}
}
2018-07-28 11:22:20 +02:00
openModals(window.location.hash);
$('a').on('click', function() {
openModals($(this).attr('href'));
});
2018-07-25 12:50:47 +02:00
$('.navbar-collapse a').on('click', function() {
$('.navbar-collapse').collapse('hide');
2018-07-24 22:45:53 +02:00
});
$('#blobheart').on('click', function() {
$('#navbar-image').attr('src', 'res/heart.png');
});
2018-07-24 22:45:53 +02:00
});