+1 vote
by
wrote in html inline<html lang="en" style="scroll-behavior: smooth;">
installed smoothscroll-polyfill and smoothscroll-anchor-polyfill via npm
Imported polyfills and called smoothscrollPolyfill.polyfill:
import smoothscrollPolyfill from 'smoothscroll-polyfill';
import smoothscrollAnchorPolyfill from 'smoothscroll-anchor-polyfill';
smoothscrollPolyfill.polyfill();
As a result, smooth scrolling works in safari, but does not work in ie11. I would be glad to get any help.
You can see the layout on the github pages: https://lir-kulikov.github.io/Bino/ (used smooth scrolling for anchor links in navigation)
by
Nadim Zakirov , the first link turned out to be the wrong library for me, but I tried installing it, and luckily it works fine! Thank you! Can you tell me how to mark your comment as a reply?
by
Kirill , thank you, no need, threw the links on a whim.

1 Answer

0 votes
by
I think it's easier to use the jQuery animate property to jump to the anchor links.
I think it's easier to use the jQuery animate property to jump to the anchor links. https://cdnjs.cloudflare.com/ajax/libs/jquery-easi...
I think it's easier to use the jQuery animate property to jump to the anchor links.
function scrollToElement (id){
$('html, body').animate({scrollTop: $('#' + id).offset().top}, /*время анимации в миллисекундах*/, /*функция плавности в кавычках, например "easeInOutExpo"*/)
}
by
In general, internet explorer no longer supports many of the modern methods and properties.
by
Thanks for the idea, but specifically in this project decided to do without jquery.
...