title: Javascript to auto click on multiple id settimeout
body: <p>I have a problem.
  I want to click on <code>$(document).ready(function()</code> to <code>id="menu1"</code> in 5 seconds after the page is loaded one after the other click function (click to menu1 wait 5 sec and then click to menu2 wait 5 sec etc.) and then repeat the click from <code>id="menu1"</code>.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;a id="menu1"&gt;
  &lt;div class="menu1"&gt;
  &lt;div class="menu1text"&gt;
  TEXT
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/a&gt;
  
  &lt;a id="menu2"&gt;
  &lt;div class="menu2"&gt;
  &lt;div class="menu2text"&gt;
  TEXT
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/a&gt;
  
  &lt;a id="menu3"&gt;
  &lt;div class="menu3"&gt;
  &lt;div class="menu3text"&gt;
  TEXT
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>    $( "#menu1" ).click(function() {
      $('.menu1').css('background-color', '#d9cbb3');
      $('.menu2').css('background-color', '#d9cbb3');
      $('.menu1text').css('color', '#000000');
      $('.menu2text').css('color', '#000000');
  
      });
  
  $( "#menu2" ).click(function() {
      $('.menu1').css('background-color', '#d9cbb3');
      $('.menu2').css('background-color', '#d9cbb3');
      $('.menu1text').css('color', '#000000');
      $('.menu2text').css('color', '#000000');
  
      });
  
  $( "#menu3" ).click(function() {
      $('.menu1').css('background-color', '#d9cbb3');
      $('.menu2').css('background-color', '#d9cbb3');
      $('.menu1text').css('color', '#000000');
      $('.menu2text').css('color', '#000000');
  
      });
  </code></pre>
  
  <p>Thanks for help.</p>