Skip to content

Commit

Permalink
Create script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Kritika30032002 authored Sep 15, 2024
1 parent 1b817f5 commit 7357c68
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Smooth scroll to sections
function scrollToSection(sectionId) {
const section = document.querySelector(sectionId);
section.scrollIntoView({ behavior: 'smooth' });
}

// Form submission handler
const form = document.getElementById('contact-form');
form.addEventListener('submit', function (event) {
event.preventDefault();
alert('Message sent successfully!');
});

0 comments on commit 7357c68

Please sign in to comment.