I connected the script to the site, but there is no smooth scrolling. However, everything works fine on a similar wordpress site, although the versions of the theme are different. site link: http://xxxzeio5.beget.tech Scroll connection code:

jQuery(function($) { $('a[href^="#"]').live('click',function(event){ event.preventDefault(); var target_offset = $(this.hash).offset() ? $(this.hash).offset().top : 0; //change this number to create the additional off set var customoffset = 85; $('html, body').animate({scrollTop:target_offset - customoffset}, 500); }); }(jQuery)); 
  • Open developer tools, see errors - Crantisz
  • @Crantisz, there are no errors, the error in js itself is zemil
  • then fix js! - user220409
  • @OlmerDale, thanks for the constructive answer! - zemil
  • There are no - Russian Bear

0