Hey there folks. I’m having an issue in Chrome & Firefox (Desktop only) with my primary accordion menu not snapping/scrolling to the top of the page. It works fine in Safari Desktop, and safari mobile, chrome mobile & firefox mobile.
Here’s the custom JS:
jQuery(function($){
var navbarHeight = $('.x-navbar-fixed-top').outerHeight();
var wpadminbarHeight = $('#wpadminbar').outerHeight();
console.log(navbarHeight, wpadminbarHeight);
$('.x-accordion-toggle').on('click', function(){
$('html,body').stop();
});
});
jQuery(document).ready(function($) {
$('.x-accordion-toggle').on('click', function(){
var $this = $(this);
setTimeout(function() {
$('html, body').animate({
scrollTop: $this.offset().top - $('.x-navbar').outerHeight()
}, 200);
}, 400);
});
});
jQuery(document).ready(function(){
jQuery('.x-block-grid-item a').attr('target', '_blank');
});
Any help would be appreciated! The website is https://noughtdesign.com