Hi @mattsdll,
You can open the onepress/assets/js/theme.js, find this function and change it as you want :
function smoothScroll( element ) {
if ( element.length <= 0 ) {
return false;
}
jQuery("html, body").animate({
scrollTop: ( jQuery( element ).offset().top - h) + "px"
}, {
duration: 800,
easing: "swing",
complete: function(){
window.current_nav_item = false;
}
});
}
Hope it helps!
If I want to change the acceleration (ease-in, ease-out), is it the word “swing” that I need to change?
If so, what are the other words that I can use?
Thank you!
Mat
Hi @mattsdll,
Yes. You can try to replace it with easing: "ease-in",
Perfect, it works.
Here is the full list of easings to use (in case anybody wants to change it also).
(ease-in does not work):
easeInSine
easeOutSine
easeInOutSine
easeInQuad
easeOutQuad
easeInOutQuad
easeInCubic
easeOutCubic
easeInOutCubic
easeInQuart
easeOutQuart
easeInOutQuart
easeInQuint
easeOutQuint
easeInOutQuint
easeInExpo
easeOutExpo
easeInOutExpo
easeInCirc
easeOutCirc
easeInOutCirc
easeInBack
easeOutBack
easeInOutBack
easeInElastic
easeOutElastic
easeInOutElastic
easeInBounce
easeOutBounce
easeInOutBounce
-
This reply was modified 9 years, 2 months ago by
mattsdll.