title: How to animate Progressbar.js when comes visible in the browser with Waypoints?
body: <p>I'm using <a href="https://kimmobrunfeldt.github.io/progressbar.js/" rel="nofollow noreferrer">Progressbar.js</a> to create an animated progress bar. But the thing is when I place it down, it before it comes into view.
  I'm using <a href="http://imakewebthings.com/waypoints/" rel="nofollow noreferrer">Waypoints</a> to trigger the animation only when visible, but I'm not getting it right.</p>
  
  <p>Please help me figure it out.</p>
  
  <p>Thank You.</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>var bar = new ProgressBar.Line(container, {
          strokeWidth: 5,
          easing: 'easeInOut',
          duration: 1400,
          color: '#FFEA82',
          trailColor: '#eee',
          trailWidth: 2,
      });
  
      bar.animate(1.0);  // Number from 0.0 to 1.0</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#container{
    margin-top:500px;
    width: 300px;
    height: 20px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/progressbar.js/1.0.1/progressbar.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js"&gt;&lt;/script&gt;
  
  
  scroll down
  &lt;div id="container"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>