Tutti Frutti
This commit is contained in:
parent
3fceb2490a
commit
032d40ef47
@ -8,7 +8,6 @@ const swiper = new Swiper('.swiper', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Für die Links in der Navbar, dass die Striche beim aktuell geklickten bleiben
|
// 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 navLinks = document.querySelectorAll('.navbar .nav-link');
|
||||||
var initialSelected = document.querySelector('.navbar .nav-link[aria-current="page"]');
|
var initialSelected = document.querySelector('.navbar .nav-link[aria-current="page"]');
|
||||||
if (initialSelected) {
|
if (initialSelected) {
|
||||||
@ -23,18 +22,9 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
link.classList.add('selected');
|
link.classList.add('selected');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
// Für Patenshop
|
|
||||||
document.getElementById('donationForm').addEventListener('submit', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
alert('Alles in Ordnung. Vielen Dank für Ihre Spende!');
|
|
||||||
this.reset();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Für Preis
|
// Für Preis
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
updatePrice();
|
updatePrice();
|
||||||
});
|
|
||||||
|
|
||||||
function updatePrice() {
|
function updatePrice() {
|
||||||
const fresserchenSelect = document.getElementById('Fresserchen');
|
const fresserchenSelect = document.getElementById('Fresserchen');
|
||||||
@ -50,4 +40,5 @@ function updatePrice() {
|
|||||||
function showDonationAmount() {
|
function showDonationAmount() {
|
||||||
const priceInput = document.getElementById('Preis').value;
|
const priceInput = document.getElementById('Preis').value;
|
||||||
alert('Danke für deine Spende von €' + priceInput + '!');
|
alert('Danke für deine Spende von €' + priceInput + '!');
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user