Hi,
I’m suspecting it is caused by the booking plugin you are using, I can see several references to a certain scrollTo() function in its main Javscript file: http://www.ortoclass.ro/wp-content/plugins/appointment-booking/frontend/resources/js/bookly.js?ver=9.4
You can check if it’s one of those by editing this part right at the bottom of that file:
function scrollTo($elem) {
var elemTop = $elem.offset().top;
var scrollTop = $(window).scrollTop();
if (elemTop < $(window).scrollTop() || elemTop > scrollTop + window.innerHeight) {
$('html,body').animate({ scrollTop: (elemTop - 24) }, 500);
}
}
Delete or comment out (with // ) the line that does the scrolling:
function scrollTo($elem) {
var elemTop = $elem.offset().top;
var scrollTop = $(window).scrollTop();
if (elemTop < $(window).scrollTop() || elemTop > scrollTop + window.innerHeight) {
// $('html,body').animate({ scrollTop: (elemTop - 24) }, 500);
}
}
Then make sure that your browser is loading the new file when you test it.
Hope that helps.
Hello,
Thank you for your help, but unfortunately it isn’t that certain line. I commented it out but now the plugin doesn’t load at all.
The problem surely comes from the plugin, but it must be another line of those that loads, not that one.
Any other ideas would be greatly appreciated.
Thank you.
My bad. It works perfectly now, it seems there was a problem with my page.
Appreciate your help. 🙂
Thanks