-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
30 lines (27 loc) · 1014 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
let currentSection = 1;
const totalSections = 4;
function scrollToNextSection() {
currentSection++;
if (currentSection >= totalSections) {
currentSection = totalSections;
transformButtonToContact();
}
document.getElementById(`section${currentSection}`).scrollIntoView({ behavior: 'smooth' });
}
function transformButtonToContact() {
const button = document.querySelector('.sticky-button');
button.textContent = '';
button.classList.add('contact');
button.onclick = function() {
// Hier kannst du die Logik für den Kontakt-Button hinzufügen
// z.B. ein Kontaktformular anzeigen oder einen Mailto-Link öffnen
window.open('https://www.linkedin.com/in/mewiyo/', '_blank');
};
}
// Initialisiere den Button beim Laden der Seite
document.addEventListener("DOMContentLoaded", function() {
const button = document.querySelector('.sticky-button');
if (currentSection >= totalSections) {
transformButtonToContact();
}
});