first commit
This commit is contained in:
15
script.js
Normal file
15
script.js
Normal file
@@ -0,0 +1,15 @@
|
||||
document.querySelectorAll('nav a').forEach(link => {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const target = this.getAttribute('href');
|
||||
document.querySelector(target).scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelector('.scroll-down').addEventListener('click', function() {
|
||||
document.querySelector('#apropos').scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user