• 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

Neil E.

Active member
#1
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)?
 

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> page_container_js_body

This will effectively disable the link:

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

Neil E.

Active member
#3
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: