Skip to content

Commit

Permalink
Create myScript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MBCharaf authored Jul 22, 2024
1 parent 0427f1d commit 6cbf751
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/myScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

$(document).ready(function() {
// Smooth scrolling for navigation links
$('a[href*="#"]').on('click', function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: $($(this).attr('href')).offset().top - 70
}, 500, 'linear');
});
})

0 comments on commit 6cbf751

Please sign in to comment.