• jsmith1990

    (@jsmith1990)


    I have used the “#” to make my top level of the menu not go anywhere so my submenus would work fine for awhile but I am not having a problem with it. It works great on all of my devices except for my Nexus 7.

    Does anyone have an idea why this would not work?

    https://wordpress.org/plugins/menu/

Viewing 12 replies - 1 through 12 (of 12 total)
  • catacaustic

    (@catacaustic)

    What do you mean by “not working”? what is it doing that you don’t expect, or not doing that you do expect?

    Thread Starter jsmith1990

    (@jsmith1990)

    When I go to a page on my website my address will be:
    http://www.website.com/page1
    When I then click on one of the top level menus that I have used the “#” to make it stay on the page it will add:
    http://www.website.com/page1/#
    After it does this it will no longer go to any pages and I have to go back to the homepage by clicking on the logo.

    Here is the website:
    http://www.tripspotr.com

    It is only doing this on my nexus 7.

    catacaustic

    (@catacaustic)

    I don’t have a Nexus, so I can’t say for sure, but the only thing that comes to mind is that the device is considering that a link, and doesn’t know what to do with it, so it just “stops” and doesn’t go any further. That’s just a guess, so it could also be wrong.

    The only thing that I can suggest is to try some jQuery “magic” and try to capture the click events for those links and handle them somehow. That might possibly help out a little.

    Thread Starter jsmith1990

    (@jsmith1990)

    Sorry for the late reply but do you have any code I could see that would make this trick work?

    catacaustic

    (@catacaustic)

    The way that I’d do it is to add a class onto the menu items that I don’t want to be clicked (in this example, I’m going to use not_active) and do something like this.

    jQuery (document).ready () {
        jQuery (".not_active").click (function (e) {
            e.preventDefault ();
        });
    }
    Thread Starter jsmith1990

    (@jsmith1990)

    So that works but then it restricts all of the action on the sub-links? How would I fix that?
    Thanks for your help so far!

    catacaustic

    (@catacaustic)

    It shouldn’t restrict anything like that. :/

    You did add in the extra class name (not_active) to the parent menu items only, didn’t you? If not, exactly how did you do this?

    Thread Starter jsmith1990

    (@jsmith1990)

    I just found that menus id and changed it. How do I add a class to a menu item?

    catacaustic

    (@catacaustic)

    That’s not quite as easy as it sounds, unfortunately.

    One idea that I’ve just thought of is something that’s been done where I work before, and seems to work alright. Instead of having those top-level menus go nowhere, make those top-level items link to the first sub-page under it. That way there’s no messing around with these things, no need to go hacking around in the code, and you won’t get users wondering why nothing is happening when they click on what they think should be a link.

    Thread Starter jsmith1990

    (@jsmith1990)

    That’s not a bad idea. I just want to know why it works on all of my other devices and not this one.

    catacaustic

    (@catacaustic)

    You’d need to ask that of what ever company produced the browser for that device. Each browser works slightly differently, especailly with Javascript, and some are different on different devices. That’s why it’s hard to get anything that works on every platform everywhere – unless you’re uisng the most basic styles and no Javascript anywhere.

    Thread Starter jsmith1990

    (@jsmith1990)

    I appreciate your help. If you think of something else to do with it let me know!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Menu # not working’ is closed to new replies.