Skip to content

Commit

Permalink
Native css/js solution for front page scroll button
Browse files Browse the repository at this point in the history
  • Loading branch information
andmor- committed Dec 19, 2023
1 parent 003d389 commit f254fb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
document
);
if (scrollDownBtn.length > 0) {
$("html", context).css("scroll-behavior", "auto"); // JQuery incompatibility with bootstrap 5 smooth scrool
scrollDownBtn.click(() => {
$("html", context)
.stop()
.animate({ scrollTop: "+=660px" }, 800);
// scroll to the first paragraph after header image
$(".paragraph", context)[1].scrollIntoView();
});
}
// Hide tags if there are more than 2
Expand Down

0 comments on commit f254fb1

Please sign in to comment.