Hi Henri,
The code from that thread will no longer due to the changes from the layout. But, I’ll provide the one that will work,
jQuery( function ($) {
$('.x-anchor-toggle[aria-haspopup="true"]').on('click', function() {
if ( $(this).attr('aria-expanded') == 'false' ) {
$('body, html').css('overflow' , 'hidden');
}
} );
$('.x-off-canvas-close, .x-modal-close, .x-modal-content-outer').on('click', function () {
$('body, html').css('overflow' , '');
} );
} );
Please note that we don’t provide support or cover code maintenance, I only provided this code as a sample or idea that it can be achieved. You’re free to change it in the future and maintain it.
Thanks!