diff --git a/assets/js/frontend.js b/assets/js/frontend.js index 9490a33..3b91787 100644 --- a/assets/js/frontend.js +++ b/assets/js/frontend.js @@ -202,7 +202,12 @@ function addRssReadMore() { // make parent item of dropdowm menu clickable which is not intended by Bootstrap jQuery( '.dropdown .dropdown-toggle' ).on( 'click', function () { - if ( jQuery( '.dropdown:hover' ).length !== 0 ) { + const dropdownOpen = jQuery( this ).hasClass( 'show' ); // dropdown shown + const mobileOpen = jQuery( '#mainmenu-container' ).hasClass( 'show' ); // mobile nav open + if ( + ( dropdownOpen === false && mobileOpen === true ) || + ( dropdownOpen === true && mobileOpen === false ) + ) { window.location = jQuery( this ).attr( 'href' ); }