Adminlte: How do I get a tab to active via the URL

Created on 18 Aug 2017  路  1Comment  路  Source: ColorlibHQ/AdminLTE

I want to navigate to http://localhost:9000/profile#subscribe and have the #subscribe tab active/open when the page loads...

How can I do that, the above url does not seem to active it...

Most helpful comment

Hi Jeffrey.

You can add this code to your main JavaScript code:
if ( document.location.hash)
{
$('.nav-tabs a[href="' + document.location.hash + '"]').tab ( 'show');
}

>All comments

Hi Jeffrey.

You can add this code to your main JavaScript code:
if ( document.location.hash)
{
$('.nav-tabs a[href="' + document.location.hash + '"]').tab ( 'show');
}

Was this page helpful?
0 / 5 - 0 ratings