javascript
Published on January 26, 2024By DeveloperBreeze
document.addEventListener('DOMContentLoaded', function () {
// Get the contact element by its ID
var contactElement = document.getElementById('contact');
// Check if the contact element exists
if (contactElement) {
// Scroll to the contact element with smooth behavior
contactElement.scrollIntoView({
behavior: 'smooth'
});
}
});
Comments
Please log in to leave a comment.