1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove Menu hover and make click

Discussion in 'Styling and Customization Questions' started by ibaker, Jan 16, 2013.

  1. ibaker

    ibaker Well-Known Member

    As we know the XF menu bar has menu item that when clicked will take you to a specific area.

    Each menu item has a hover arrow that provides a drop down box of sub menu links

    What I would like to achieve is:
    1. Completely remove the hover that creates the drop down sub menu list
    2. Make the menu item itself display a drop down sub menu list when clicked by a user
    3. The drop down sub menu list be adaptable to adding extra items and displayed in say 2 cols (like the navigation visitor tab) however not all items in the drop down sub menu are displayed in the 2nd row of the menu bar when in that section

    Something like this when a user clicks on a menu item:

    Can anyone lend a hand and advise how to achieve this...thanks
  2. TrevC

    TrevC Well-Known Member

    Watching this one for replies. I've also thought that hover triggered menus on a website seemed a bit hostile/in-your-face, especially when they need to "load" first. Personally, i'm never expecting a block of content to pop up after simply mousing over a small area. Native applications don't use hover triggers because it would freak people out.

    I'm messing around with the JS trying to fix this now, no promises that I'll get anywhere with it :)

    When you load Xenforo on a device with touch-input, this is already the default behaviour.
  3. TrevC

    TrevC Well-Known Member

    Found the solution.

    Just insert a huge value there to effectively disable the hover trigger.
    Jake Bunce likes this.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Interesting. I never thought of that, but it works.
  5. TrevC

    TrevC Well-Known Member

    Yep. Easy to remember, less hacking apart Xenforo JS.

    The behaviour feels much better, give it a try :)
  6. ibaker

    ibaker Well-Known Member

    Thanks Guys...not a perfectly clean method as the function occurs even though not being used rather then being removed, but there is always more then 1 way to achieve something so thanks again for your help
  7. TrevC

    TrevC Well-Known Member

    In working to improve the Xenforo structure/appearance, this hack is probably one of the cleaner ones :) You should see some of our greasy conditional arrays for re-routing pages/content...
    ibaker likes this.
  8. ibaker

    ibaker Well-Known Member


Share This Page