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

XF 1.3 NavTab button with no action on click

Discussion in 'Styling and Customization Questions' started by Neil E., Dec 26, 2014.

  1. Neil E.

    Neil E. Active Member

    I'd like to create an extra NavTab button that does nothing when clicked. It will be present just to made a dropdown menu open on mouseover.

    <li class="navTab PopupClosed"><a href=" " class="navLink">Information</a></li>

    This creates the button fine, but when clicked, it loads the forum index. Is there any way to make it do nothing (or perhaps reload the current page)?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> page_container_js_body

    This will effectively disable the link:

    $('.navTab.members a.navLink').attr('href','javascript:void(0)');
    All nav tabs have their own class (e.g. members) which you must specify in this javascript code.
  3. Neil E.

    Neil E. Active Member

    Thanks Jake, that works well. The Members button no longer calls the member list; however it does toggle the dropdown blockLinksList on and off. The original hover action is also maintained.
    Last edited: Dec 30, 2014

Share This Page