title: switching between tabs menu by time
body: <p>I'm new to HTML and I am trying to build a site. I have everything I want to display, but I need help clicking between tabs automatically.<br />
  Is it possible to switch between tabs every 5 mins?
  Can anyone point me into the right direction or help me create the JS to do this?
  Thank you in advance!!!</p>
  <p>Picture of the Page:
  <a href="https://i.stack.imgur.com/nvSaJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nvSaJ.png" alt="enter image description here" /></a></p>
  <pre><code>&lt;!DOCTYPE html&gt;
      &lt;html&gt;
      
      &lt;head&gt;
      
          &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge,Chrome=1&quot;&gt;
          &lt;!-- &lt;meta http-equiv=&quot;refresh&quot; content=&quot;90&quot;&gt; --&gt;
          &lt;title&gt;Plasma MFG Dashboard&lt;/title&gt;
      
          &lt;link href=&quot;css/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
          &lt;script src=&quot;js/jquery-1.7.2.min.js&quot;&gt;&lt;/script&gt;
          &lt;style type=&quot;text/css&quot;&gt;
          
          &lt;/style&gt;
      &lt;/head&gt;
      
      &lt;body&gt;
          &lt;header&gt;
              &lt;h1&gt;Plasma MFG Dashboard&lt;/h1&gt;
          &lt;/header&gt;
          &lt;ul id=&quot;tabs&quot;&gt;
              &lt;li&gt;&lt;a href=&quot;#&quot; name=&quot;tab1&quot;&gt;HOURLY WIP&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=&quot;#&quot; name=&quot;tab2&quot;&gt;LINE REPORT&lt;/a&gt;&lt;/li&gt;
              
      
      
          &lt;/ul&gt;
          &lt;div id='content'&gt;
      
      
      
              &lt;div id=&quot;tab1&quot;&gt;
                  &lt;iframe frameborder=&quot;0&quot; scrolling=&quot;yes&quot;
                      src=&quot;http://dm5ie.itg.ti.com/dm5ie/dashboard/DailyMetrics/DM5_InProcess_Hourly_ext.htm&quot;
                      style=&quot;width:100%; height:3000px; -ms-zoom: .995; -webkit-transform: scale(.995); -webkit-transform-origin: 0 0; -o-transform: scale(0.995); -o-transform-origin: 0 0;&quot;&gt;&lt;/iframe&gt;
              &lt;/div&gt;
              
              &lt;div id=&quot;tab2&quot;&gt;
                  &lt;iframe id=&quot;lineReport&quot; frameborder=&quot;0&quot; scrolling=&quot;yes&quot; src=&quot;&quot; style=&quot;width:100%; height:550px;  &quot;&gt;&lt;/iframe&gt;
                  
              &lt;/div&gt;
      
          &lt;/body&gt;
          &lt;footer&gt;
              &lt;br&gt;
             
             
          &lt;/footer&gt;
          &lt;script src=&quot;js/jquery-1.7.2.min.js&quot;&gt;&lt;/script&gt;
          &lt;script&gt;
              $(document).ready(function () {
                  $(&quot;#content&quot;).find(&quot;[id^='tab']&quot;).hide(); // Hide all content
                  $(&quot;#tabs li:first&quot;).attr(&quot;id&quot;, &quot;current&quot;); // Activate the first tab
                  $(&quot;#content #tab1&quot;).fadeIn(); // Show first tab's content
          
                  $('#tabs a').click(function (e) {
                      e.preventDefault();
                      if ($(this).closest(&quot;li&quot;).attr(&quot;id&quot;) == &quot;current&quot;) { //detection for current tab
                          return;
                      } else {
                          $(&quot;#content&quot;).find(&quot;[id^='tab']&quot;).hide(); // Hide all content
                          $(&quot;#tabs li&quot;).attr(&quot;id&quot;, &quot;&quot;); //Reset id's
                          $(this).parent().attr(&quot;id&quot;, &quot;current&quot;); // Activate this
                          $('#' + $(this).attr('name')).fadeIn(); // Show content for the current tab
                      }
                  });
                  $(window).scroll(function () {
                      console.log($(window).scrollTop())
                      if ($(window).scrollTop() &gt; 90) {
                          $('#tabs').addClass('navbar-fixed');
                      }
                      if ($(window).scrollTop() &lt; 91) {
                          $('#tabs').removeClass('navbar-fixed');
                      }
                  });
              });        
              const getDate = () =&gt; {
                  const newDate = new Date();
                  const year = newDate.getFullYear();
                  const month = newDate.getMonth() + 1;
                  const d = newDate.getDate();
          
                  return `${month.toString().padStart(2, '0')}%2F${d.toString().padStart(2, '0')}%2F${year}`;
              }
          
          
              document.getElementById('lineReport').src =
                  'http://linereport.sc.ti.com/flowMgmt/AppServlet?facility=DP1DM5&amp;summary=module&amp;customer=ALL&amp;device_group=ALL&amp;archive_date='
                  .concat(getDate()) +
                  '&amp;realTime=Y&amp;outtype=excel&amp;action=getFlowData&amp;jspURL=flowMgmtSummaryDisplay.jsp&amp;uLogReportName=FlowMgmt&amp;uLogKey1=SummaryLevel&amp;excel=false&amp;uLogValue1=Module';
          &lt;/script&gt;
          
          &lt;/html&gt;
  </code></pre>