this is it –
the link jumps to the correct area with or without the script
thanks
<script>
jQuery( document ).ready( function( $ ) {
$( document ).on( ‘click’, ‘.main-nav li > a:first-child’, function( e ) {
var mobile = $( ‘.menu-toggle’ );
if ( mobile.is( ‘:visible’ ) ) {
$( ‘.menu-toggle’).closest( ‘.main-navigation’ ).removeClass( ‘toggled’ );
$( ‘.menu-toggle’).closest( ‘.main-navigation’ ).attr( ‘aria-expanded’, $( ‘.menu-toggle’).closest( ‘.main-navigation’ ).attr( ‘aria-expanded’ ) === ‘true’ ? ‘false’ : ‘true’ );
$( ‘.menu-toggle’).removeClass( ‘toggled’ );
$( ‘.menu-toggle’).children( ‘i’ ).addClass( ‘fa-bars’ ).removeClass( ‘fa-close’ );
$( ‘.menu-toggle’).attr( ‘aria-expanded’, $( this ).attr( ‘aria-expanded’ ) === ‘false’ ? ‘true’ : ‘false’ );
}
});
});
</script>