title: Progress bar not working in html file
body: <p>I am creating a progrees bar is it working fine in jsfiddle demo but when i use in html file it is not working here is my code 
  i am writing same code as given in jsfiddle but it is not working </p>
  
  <pre><code> &lt;html&gt;
   &lt;head&gt;
   &lt;style&gt;
    .ui-progressbar.beginning .ui-progressbar-value { background: red; }
    .ui-progressbar.middle .ui-progressbar-value { background: yellow; }
    .ui-progressbar.end .ui-progressbar-value { background: green; }
   &lt;/style&gt;
   &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  
   &lt;/head&gt;
  
  
   &lt;script&gt;
    var $progressbar = $("div").progressbar();
  
  
    function updateProgressbar(current, target) {
  
  
     var value = parseInt(current / target * 100);
  
     $progressbar
  
     .progressbar("value", value)
  
     .removeClass("beginning middle end")
  
  
      .addClass(value &lt; 40 ? "beginning" : value &lt; 80 ? "middle" : "end");
    }
  
  
  
    var total = 255;
  
  
     var working = 0;
  
  
  
  
  
   function update() {
  
     working++;
   updateProgressbar(working, total);
  if (working &lt; total) setTimeout(update, 10);
  
     }
  var $progressbar = $("div").progressbar();
  
  function updateProgressbar(current, target) {
  
  
  var value = parseInt(current / target * 100);
  
  
  
  
  
  $progressbar
  
  
      .progressbar("value", value)
  
  
      .removeClass("beginning middle end")
  
  
      .addClass(value &lt; 40 ? "beginning" : value &lt; 80 ? "middle" : "end");
  
  
     }
  
  
  
  
  
     var total = 255;
  
  
    var working = 0;
  
  
    function update() {
  
  
     working++;
  
  
  
  
  updateProgressbar(working, total);
  
  
  if (working &lt; total) setTimeout(update, 10);
  
  
    }
  
  
  
  
    &lt;/script&gt;
    &lt;/head&gt;
  
  &lt;body onload="update()"&gt;
  
  &lt;div&gt;
  
  
  &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>and here is js fiddle link working</p>
  
  <p><a href="http://jsfiddle.net/ZQrnC/305/" rel="nofollow">http://jsfiddle.net/ZQrnC/305/</a></p>