gładka przewijana do kotwicy
/* Just use Native HTML Smooth Scroll */
html {
scroll-behavior: smooth;
}
gtamborero
/* Just use Native HTML Smooth Scroll */
html {
scroll-behavior: smooth;
}
html {
scroll-behavior: smooth;
}
/* No support in IE, or Safari
You can use this JS polyfill for those */
http://iamdustan.com/smoothscroll/
//add smooth scrolling when clicking any anchor link
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
//<a href="#someOtherElementID"> Go to Other Element Smoothly </a>
jQuery(document).ready(function($) {
var $page = $('html, body');
$('a[href*="#"]').click(function() {
$page.animate({
scrollTop: $($.attr(this, 'href')).offset().top-50
}, 600);
return false;
});
});
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});