Comments 2tha-plug started the conversationFebruary 6, 2017 at 8:25pmWe have a menu point that direct you to a section on the homesite. Unfortunately after clicking the menu remains open, which we believe is irritating for the client. Is there something we can do about it except of changing the menu type?[deleted] repliedFebruary 8, 2017 at 1:24pmHi,Add this JavaScript code in Theme Options > Footer > JavaScript & Tracking Code > Footer JavaScript: <script>function closeSidebarMenu() { requestAnimationFrame( function() { publicVars.$body.removeClass( 'sidebar-is-opened' ); if ( publicVars.$sidebarMenu.hasClass( 'sidebar-alignment-left' ) ) { publicVars.$body.removeClass( 'sidebar-is-opened-left' ); } publicVars.$sidebarMenu.css( 'transform', 'translate3d(0px,0px,0px)' ); }, publicVars.$wrapper);}jQuery( document ).ready( function( $ ) { $( '.sidebar-main-menu a[href*="#"]' ).on( 'click', closeSidebarMenu );} );</script>This should add that functionality to auto-close sidebar menu when clicking inline page elements. Sign in to reply ...
We have a menu point that direct you to a section on the homesite. Unfortunately after clicking the menu remains open, which we believe is irritating for the client. Is there something we can do about it except of changing the menu type?
Hi,
Add this JavaScript code in Theme Options > Footer > JavaScript & Tracking Code > Footer JavaScript:
This should add that functionality to auto-close sidebar menu when clicking inline page elements.