0

I have five tabs with each tabs content after click on tabs there are content for each tab, currently if I am on 3rd tab and if I reload the page I automatic moved on first tab, I would like to when I click on any tab after the reload page I need to still on same tab, please help

 <div class="tab" role="tabpanel">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#Section1" aria-controls="home" role="tab" data-toggle="tab">Tab 1</a></li>
                    <li role="presentation"><a href="#Section2" aria-controls="profile" role="tab" data-toggle="tab">Tab 2</a></li>
                    <li role="presentation"><a href="#Section3" aria-controls="messages" role="tab" data-toggle="tab">Tab 3</a></li>
                    <li role="presentation"><a href="#Section4" aria-controls="profile" role="tab" data-toggle="tab">Tab 4</a></li>
                    <li role="presentation"><a href="#Section5" aria-controls="messages" role="tab" data-toggle="tab">Tab 5</a></li>
                </ul>
                
                <div class="tab-content tabs">
                    <div role="tabpanel" class="tab-pane fade in active" id="Section1">
                    <p>content</p>
                    </div>
                    </div>
Designer16
  • 53
  • 1
  • 8
  • Does this answer your question? [Go to Specific Tab on Page Reload or Hyperlink where tab is loaded by AJAX](https://stackoverflow.com/questions/29679749/go-to-specific-tab-on-page-reload-or-hyperlink-where-tab-is-loaded-by-ajax) – tolik518 Nov 16 '21 at 11:57
  • 1
    You need to use `localStorage`, when user click to a tab script will create/edit `localStorage` for store which tab was clicked then to next reload will load from it. If the `localStorage` doesn't exist will load the first tab. – Simone Rossaini Nov 16 '21 at 12:12
  • Thank for your reply and your prompt time much appreciated!, I am not using AJAX, – Designer16 Nov 16 '21 at 12:48

0 Answers0