title: How to change color of each progress bar
body: <p>I'm using Bootstrap 3 for this progress bar, as you can see <a href="http://jsfiddle.net/Herlina/51Lw7zfe/12/" rel="nofollow noreferrer">here</a>, there is multiple class for each color such as success(green) warning(yellow) and danger(red).</p>
  <p>Here is the HTML for my progress bars:</p>
  <pre><code>&lt;link href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
  &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js&quot;&gt;&lt;/script&gt;
  
  &lt;div class=&quot;col-md-5&quot;&gt;
    &lt;p&gt;Progress bar1&lt;/p&gt;
    &lt;div class=&quot;progress progress-striped active&quot;&gt;
      &lt;div class=&quot;progress-bar&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;p&gt;Progress bar2&lt;/p&gt;
    &lt;div class=&quot;progress progress-striped active&quot;&gt;
      &lt;div class=&quot;progress-bar&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;p&gt;Progress bar3&lt;/p&gt;
    &lt;div class=&quot;progress progress-striped active&quot;&gt;
      &lt;div class=&quot;progress-bar&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>and this is my JavaScript function</p>
  <pre><code>$( document ).ready(function() {
      $(&quot;.progress-bar&quot;).each(function (index ) {
            var percent = Math.floor((Math.random() * 37) + 60);
              $(this).html(percent+&quot;%&quot;);
              $(this).animate({width: percent+&quot;%&quot;}, 2500);
              if (percent&lt;79){
                $(this).addClass('progress-bar-danger');
              } else if(parseInt(percent)&lt;89){
                $(this).addClass('progress-bar-warning');
              } else{
                $(this).addClass('progress-bar-success');
              }
      })
  });    
  </code></pre>
  <p>So, I want to make the generated data appear every 5 or 10 minutes. not every page is refreshed, how can i do that based on my script ? Thank you</p>
  <p><a href="http://jsfiddle.net/Herlina/51Lw7zfe/12/" rel="nofollow noreferrer">Fiddle link</a></p>