title: How to show tab panel on same page
body: <p>Hello friends I found w3 tab script I used this in my project it perfectly work on my page but I want this tabs in two different panels in single page, two tabs panel not work perfectly only one tab panel works fines. following is code snippet</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function openCity(evt, cityName) {
    var i, tabcontent, tablinks;
    tabcontent = document.getElementsByClassName("tabcontent");
    for (i = 0; i &lt; tabcontent.length; i++) {
      tabcontent[i].style.display = "none";
    }
    tablinks = document.getElementsByClassName("tablinks");
    for (i = 0; i &lt; tablinks.length; i++) {
      tablinks[i].className = tablinks[i].className.replace(" active", "");
    }
    document.getElementById(cityName).style.display = "block";
    evt.currentTarget.className += " active";
  }
  
  // Get the element with id="defaultOpen" and click on it
  document.getElementById("defaultOpen").click();</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>ul.tab {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
  }
  
  /* Float the list items side by side */
  ul.tab li {float: left;}
  
  /* Style the links inside the list items */
  ul.tab li a {
    display: inline-block;
    color: black;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: 0.3s;
    font-size: 17px;
  }
  
  /* Change background color of links on hover */
  ul.tab li a:hover {
    background-color: #ddd;
  }
  
  /* Create an active/current tablink class */
  ul.tab li a:focus, .active {
    background-color: #ccc;
  }
  
  /* Style the tab content */
  .tabcontent {
    display: none;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-top: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul class="tab"&gt;
    &lt;li&gt;&lt;a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'London')" id="defaultOpen"&gt;London&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'Paris')"&gt;Paris&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'Tokyo')"&gt;Tokyo&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;div id="London" class="tabcontent"&gt;
    &lt;h3&gt;London&lt;/h3&gt;
    &lt;p&gt;London is the capital city of England.&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div id="Paris" class="tabcontent"&gt;
    &lt;h3&gt;Paris&lt;/h3&gt;
    &lt;p&gt;Paris is the capital of France.&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div id="Tokyo" class="tabcontent"&gt;
    &lt;h3&gt;Tokyo&lt;/h3&gt;
    &lt;p&gt;Tokyo is the capital of Japan.&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;div id="tabs"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-md-12" style="padding:0px;"&gt;
  
        &lt;ul class="tab modal-tab"&gt;
          &lt;li&gt;&lt;a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'Delhi')" id="defaultOpen"&gt;Delhi&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'NewYork')"&gt;New York&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
  
        &lt;div id="Delhi" class="tabcontent" style="display:block;"&gt;
          &lt;h3&gt;OrderDelivered&lt;/h3&gt;
          &lt;p&gt;Delhi is the capital of India.&lt;/p&gt;
        &lt;/div&gt;
        &lt;div id="NewYork" class="tabcontent"&gt;
          &lt;h3&gt;OrderFailed&lt;/h3&gt;
          &lt;p&gt;New York is the city of America.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want this both of tab panel work fine not only one at a time</p>