23 lines
No EOL
651 B
JavaScript
23 lines
No EOL
651 B
JavaScript
$(function() {
|
|
let openModals = function(hash) {
|
|
if (hash.length > 1) {
|
|
if (hash === '#impressum') {
|
|
$('#impressum-modal').modal('show');
|
|
} else if (hash === '#glimmers') {
|
|
$('#book-modal').modal('show');
|
|
}
|
|
}
|
|
}
|
|
openModals(window.location.hash);
|
|
$('a').on('click', function() {
|
|
openModals($(this).attr('href'));
|
|
});
|
|
|
|
$('.navbar-collapse a').on('click', function() {
|
|
$('.navbar-collapse').collapse('hide');
|
|
});
|
|
|
|
$('#blobheart').on('click', function() {
|
|
$('#navbar-image').attr('src', 'res/heart.png');
|
|
});
|
|
}); |