27 lines
848 B
JavaScript
27 lines
848 B
JavaScript
const swiper = new Swiper('.swiper', {
|
|
direction: 'vertical',
|
|
loop: true,
|
|
|
|
pagination: {
|
|
el: '.swiper-pagination',
|
|
},
|
|
});
|
|
|
|
// Für die Links in der Navbar, dass die Striche beim aktuell geklickten bleiben
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
var navLinks = document.querySelectorAll('.navbar .nav-link');
|
|
var initialSelected = document.querySelector('.navbar .nav-link[aria-current="page"]');
|
|
if (initialSelected) {
|
|
initialSelected.classList.add('selected');
|
|
}
|
|
|
|
navLinks.forEach(function(link) {
|
|
link.addEventListener('click', function() {
|
|
// Alle anderen Links zurücksetzen
|
|
navLinks.forEach(l => l.classList.remove('selected'));
|
|
// Die 'selected' Klasse zum angeklickten Link hinzufügen
|
|
link.classList.add('selected');
|
|
});
|
|
});
|
|
});
|