Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20452

    Hi there, I’m currently having 2 issues when viewing the menu on an iPhone.

    1. I’ve got some parent menu links which are disabled (meaning I don’t want them to be clickable, they’re only there as label for the sub menu items). This works fine on the desktop version but unfortunately these parent menu links are clickable on the responsive menu and therefore bring up empty, undefined pages.

    2. The second issue is that there is no structure in the responsive menu. What I mean is there is no way of telling the difference between parent and child links. I’ve updated the theme to version 1.6 and am using iOS 5.1.1 (using Safari). I’ve seen an earlier thread that says 1.6 would have resolved this?

    Thanks

    Shane

    #107684

    Hi,

    1) Try to replace following code in wp-content/themes/choices/js/avia.js:

    //get url and text for option
    var link = $(this).find('a:first-child').attr('href');
    var text = levelStr + $(this).clone().children('ul, ol').remove().end().text();

    //add option
    selectString += '<option value="'+link+'">'+text+'</option>';

    with:

    //get url and text for option
    var link = $(this).find('a:first-child').attr('href');
    var text = levelStr + $(this).clone().children('ul, ol').remove().end().text();

    if(link && jQuery.trim(link) != '')
    {
    //add option
    selectString += '<option value="'+link+'">'+text+'</option>';
    }

    2) I’ll mark this for Kriesi. On my PC the sub-menu items are indented but I’m not sure if the iphone, etc. displays the menu items properly.

    #107685

    Seems the latest version of ios removes the line breaks that are used for indentation. I will replace them with a dash in the next update. meanwhile you can search in avia.js for the mobile menu call at the top (around line 100) and change the indent string to whatever you prefer:


    jQuery('.main_menu ul:eq(0)').mobileMenu({
    switchWidth: 768,
    topOptionText: jQuery('.main_menu').data('selectname'),
    indentString: '- ' //string for indenting nested items
    });

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Responsive menu on iPhone’ is closed to new replies.