Implemented When will we be able to link direct to a js tab?



see title:p

(if somebody doesn't know what i mean: doesn't link to the information tab, the first tab is always active instead of #info in my example...
which links direct to my releases tab

it's really anoying, specially if you have addons which have to redirect to the same page after some action... e.g. when i create/delete a usernote, it redirects after the action to the profile posts tab instead of setting the user notes tab active

It's a bug since the first beta, which is really very annoying...

The only way i'm aware of, is this:
<script type="text/javascript">
    $(document).bind('XenForoActivationComplete', function() {
        $test = document.URL.split("#")[1];
        if ($test && $test == 'invitestab') {
            $tabContainer = $('#ragtektabs');
            var $api = $'tabs');
            $current = $;
$noTab = $("li.noTab");
$noTab.bind('click', function(){
window.location = $'url');
but it's working only for own pages where i exactly know how many tabs exist and the possition, so it's not possible to use this "hack" for addons adding own tabs to the profile, because you never know the possition of your tab


Well-known member
I've noticed this as well, have yet to dig into it (I thought I had missed something myself, apparently not). Will let you know if I find anything, but most likely this just needs to be fixed by the devs. Shouldn't be too hard to create a workaround that works for all tabs though.


Well-known member
We've created this solution
<script type="text/javascript">
$(document).bind('XenForoActivationComplete', function() {
$tab= document.URL.split("#")[1];
if ($tab) {
$tabContainer = $('#tabcontainer');
var $api = $'tabs');
var tabArray = $api.getTabs();
$.each(tabArray, function (i,val){
if (tabArray[i]['hash'] == '#'+$tab){;
Which works for all tabs in the tabcontainer:)

I think if i could find a way to hook into the xenforo_tabs method, it would work for all xenforo tabs.
The only problem is that it's working only for the tab, we can't jump to hash:/

e.g. works works not because the tabname is wrong profile-post != profile-post-13806