title: JavaScript progress bar : Require is not defined
body: <p>I'm trying to use progress bar in my application from this site : <a href="https://github.com/kimmobrunfeldt/progressbar.js" rel="nofollow">https://github.com/kimmobrunfeldt/progressbar.js</a></p>
  
  <p>I've written below code in my application :</p>
  
  <pre><code>var element = document.getElementById('example-clock-container');
          element.innerHTML = '&lt;header id="clock-seconds"&gt;&lt;/header&gt;';
          var textElement = document.getElementById('clock-seconds');
  
          var ProgressBar = require('resources/js/progressbar.js')
  
          var seconds = new ProgressBar.Circle(element, {
              duration: 200,
              color: "#492B2B",
              trailColor: "#F3E4D0"
          });
  
          setInterval(function() {
              var second = new Date().getSeconds();
              seconds.animate(second / 60, function() {
                  textElement.innerHTML = second;
              });
          }, 1000);
  </code></pre>
  
  <p>But it throws me an error saying </p>
  
  <blockquote>
    <p>Uncaught ReferenceError: require is not defined</p>
  </blockquote>
  
  <p>How can I get reference to object given it's file name ?</p>
  
  <p>Thanks</p>