mercredi 2 mai 2018

Changing active tab on window.location, specific url

I have a view with multiple tabs and each tab has multiple submit methods so I decided to direct every tab to a specific url. I have tried may ways with jquery and js that I found on google but neither one worked for this.

<ul class="nav nav-tabs">
                <li class="active" >
                    <a onclick="window.location = '/business-bakery-manager'" data-toggle="tab" href="#dashboard" >Dashboard</a>
                </li>
                <li >
                    <a href="#product" onclick="window.location = '/bakery-product-listing'" data-toggle="tab">Manage Product Listing </a>
                </li>
                <li >
                    <a href="#orders" onclick="window.location = '/bakery-sales'" data-toggle="tab">Manage Sales </a>
                </li>
                <li >
                    <a href="#sales" onclick="window.location = '/bakery-orders'" data-toggle="tab">Manage Orders </a>
                </li>
            </ul>
            <div class="tab-content">
                   @yield('tab-content')
                </div>
            </div>

//tab-content

<div id = "product" >
 <div class="row">
 </div>
</div>

What I want is, to return to a particular tab where different urls are loaded. But whenever the page is loaded it return only to the first tab.Previously active worked without the window.load function.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire