Hide aside menu with anchors on click

GK User
Fri Jan 02, 2015 2:43 pm
Hi,

the aside menu in mobile devices doens't hide when you click on a menu option. In the demo the aside menu disappears beause it links to another page but it remains if the menu link is an anchor in the same page.

is there any onClick javascript-thing or something to make this menu useful with anchors?

Thanks!
User avatar
Senior Boarder

GK User
Fri Jan 02, 2015 6:30 pm
Could you please post an url to your site?
User avatar
Moderator

GK User
Wed Jan 07, 2015 12:04 pm
Can I send it to you by pm?

client doens't want to publish till it is finished.
User avatar
Senior Boarder

GK User
Wed Jan 07, 2015 5:54 pm
Please send me a PM with:
1. URL to your website
2. if required - login and password of user with login privileges (please create one for me)
3. link to this thread
User avatar
Moderator

GK User
Wed Jan 14, 2015 10:53 am
Hi Cyberek,

I've sent the pm a week ago but i don't know if you recieve any of them (2 different posts :roll: )
User avatar
Senior Boarder

GK User
Fri Jan 16, 2015 5:23 pm
I have checked your site and it doesn't have any local anchor element types.
I need a sample element to check if that is easily possible to fix.
User avatar
Moderator

GK User
Fri Jan 16, 2015 5:32 pm
Hi,

menu anchors are linked to sections like <section id="carta"> or <section id="tu-vino">. I works with the top menu and with the aside menu on mobile devices. The thing is that aside menu doesn't hide once you click a menu option.
User avatar
Senior Boarder

GK User
Fri Jan 16, 2015 6:18 pm
Yeah, I know, but your menu currently doesn't have such items, or am I wrong?
User avatar
Moderator

GK User
Fri Jan 16, 2015 6:33 pm
Sorry, please try again.

It was set only in spanish, now it is in both languages.
User avatar
Senior Boarder

GK User
Sun Jan 18, 2015 12:14 pm
Please resend me login credentials. We have some issue with pms and previous information is gone.
User avatar
Moderator

GK User
Tue Jan 20, 2015 11:26 am
Sent.

Please confirm that you received the pm. I know there have been problems with pms.

Thank you again.
User avatar
Senior Boarder

GK User
Thu Jan 22, 2015 12:23 pm
I got the PM.
As this is not an easy thing to do and require some coding I'll report the issue to our dev team. As soon as I'll get an answer I'll write back.
User avatar
Moderator

GK User
Thu Jan 22, 2015 12:34 pm
Ok, thank you very much. I'll be waiting distracting my client with other things ;)
User avatar
Senior Boarder

GK User
Sat Jan 24, 2015 11:06 am
Ok. I hope the change will be available with next template update but I can't guarantee that.
User avatar
Moderator

GK User
Sat Jan 24, 2015 12:22 pm
Is there an estimated time for next update? or any clue to fixed this now?
User avatar
Senior Boarder

GK User
Mon Jan 26, 2015 5:06 pm
Sorry, no :(. Its added as an improvement to be included but no release date :(.
User avatar
Moderator

GK User
Mon Jan 26, 2015 5:10 pm
OK ;) Hope i get better luck with the other post... don't forget it! ;)
User avatar
Senior Boarder

GK User
Mon Jan 26, 2015 5:45 pm
I did't. It requires dev team checkout. Waiting for reply from them.
User avatar
Moderator

GK User
Tue Feb 03, 2015 5:11 pm
So we have a fix:
Please edit file /templates/gk_steakhouse/js/gk.menu.js and fid this part:
Code: Select all
    // Aside menu
    if(jQuery('#aside-menu').length > 0) {
        var staticToggler = jQuery('#static-aside-menu-toggler');
       
        staticToggler.click(function() {
            gkOpenAsideMenu();
        });
       
        jQuery('#close-menu').click( function() {
            jQuery('#close-menu').toggleClass('menu-open');
            jQuery('#gkBg').toggleClass('menu-open');
            jQuery('#aside-menu').toggleClass('menu-open'); /* HERE */
        });
    }
    // detect android browser

Now modify it to look this way:
Code: Select all
    // Aside menu
    if(jQuery('#aside-menu').length > 0) {
        var staticToggler = jQuery('#static-aside-menu-toggler');
       
        staticToggler.click(function() {
            gkOpenAsideMenu();
        });
       
        jQuery('#close-menu').click( function() {
            jQuery('#close-menu').toggleClass('menu-open');
            jQuery('#gkBg').toggleClass('menu-open');
            jQuery('#aside-menu').toggleClass('menu-open'); /* HERE */
        });
       
        jQuery('#aside-menu').find('a[href^="#"]').click(function() {
           jQuery('#close-menu').trigger('click');
        });
    }
    // detect android browser
User avatar
Moderator

GK User
Tue Feb 03, 2015 5:11 pm
Fix to the template will be released with next template update.
User avatar
Moderator

GK User
Tue Feb 03, 2015 5:28 pm
:woohoo:

Great! Thx very much Cyberek!
User avatar
Senior Boarder

GK User
Tue Feb 03, 2015 7:27 pm
Is the code working as expected?
User avatar
Moderator

GK User
Tue Feb 03, 2015 7:51 pm
Works perfect... try it yourself!
User avatar
Senior Boarder

GK User
Thu Feb 05, 2015 8:17 am
Ok. Thanks for the info :)
Please let me know if you would have any additional questions regarding this topic.
User avatar
Moderator

GK User
Thu Feb 05, 2015 10:51 am
Nothing else. Everything is right and beautiful and happy :silly:
User avatar
Senior Boarder

GK User
Fri Feb 06, 2015 10:12 am
Nice and shining :)
Remember after finishing the site to show it off on our "members sites" subforum :)
User avatar
Moderator


cron