From 59ba2b16b127e60899410cc305bc778f65519f01 Mon Sep 17 00:00:00 2001 From: Nisha kulkarni <151458412+Nishakulkarni06@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:04:43 +0530 Subject: [PATCH] Added auto scroll to top when clicked on pagination buttons (#1898) --- index.html | 4 ++-- script.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 80c939d6c..29e1ad9d9 100644 --- a/index.html +++ b/index.html @@ -5995,9 +5995,9 @@

Provides the user's zodiac sign by taking the date of birth as input.

- + - +
diff --git a/script.js b/script.js index 4985edf28..c82d1526c 100644 --- a/script.js +++ b/script.js @@ -343,3 +343,10 @@ function validateName(inputId) { input.value = value.replace(/[^A-Za-z ]/g, ''); // Remove any non-alphabetic characters } } + +function scrollToSearch() { + const searchBar = document.getElementById('searchBar'); + searchBar.scrollIntoView({ + behavior: "smooth" + }); +} \ No newline at end of file