solved Audio Pro mobile menu button

alt=
@andrusito
7 years ago
302 posts
Hi,

I use Audio Pro skin and want to know how to make the menu button close the menu when it is already opened. It doesn't do anything at the moment. I have to click outside the menu area to close it.

Anyone knows?
updated by @andrusito: 01/15/18 11:07:26PM
michael
@michael
7 years ago
7,671 posts
Added it as a feature request/suggestion to the skins.

Currently controlled by this code in the footer.tpl file
{* Slidebar Mobile Menu *}
<script type="text/javascript">
    (function($) {
        $(document).ready(function() {
            var ms = new $.slidebars();
            $('li#menu_button > a').on('click', function() {
                ms.slidebars.open('left');
            });
        });
    }) (jQuery);
</script>
alt=
@andrusito
7 years ago
302 posts
Hi @michael,

Do you know how to make it close the menu?
michael
@michael
7 years ago
7,671 posts
Im not familiar with slidebars so don't have an instant solution sorry. Here are the docs for that script:
https://github.com/adchsm/Slidebars
https://www.adchsm.com/slidebars/

Looks possible, as this demo shows a TOGGLE button:
https://www.adchsm.com/slidebars/demos/left-and-right/

Probably something like
ms.slidebars.toggle();
or
ms.slidebars.toggle('left');

updated by @michael: 10/14/17 02:21:40AM
alt=
@andrusito
7 years ago
302 posts
Thanks Michael!

ms.slidebars.toggle('left');

That worked!
updated by @andrusito: 10/17/17 11:40:25AM

Tags