title: How to work with animate JQuery
body: <p>i'm creating progress bar and i'm animating it to 80% . i want when it reaches 80% , it stays for 3 to 4 seconds and then animate to 0% . </p>
  
  <p>Fiddle : <a href="https://jsfiddle.net/r6zj42u3/1/" rel="nofollow">https://jsfiddle.net/r6zj42u3/1/</a></p>
  
  <p>My JS</p>
  
  <pre><code>var progessss = $('#progressBar');
  var counterProgressBar = 1;
  
  for(var x = 0; x &lt;= 1; x++){
  
      if(counterProgressBar === 1)
      {
          progessss.animate({
              'width':'+=80%'
          },1000);
  
      }
  
      counterProgressBar++;
  }
  </code></pre>
  
  <p>i was trying </p>
  
  <pre><code>var progessss = $('#progressBar');
  var counterProgressBar = 1;
  
  for(var x = 0; x &lt;= 1; x++){
  
      if(counterProgressBar === 1)
      {
          progessss.animate({
              'width':'+=80%'
          },1000);
  
      }
      else
      {
          progessss.animate({
            'width':'0%'
          },1000);
      }
  
      counterProgressBar++;
  }
  </code></pre>