how to programmatically hide a progress bar using javascript : <p>i am using a progress bar which I want to appear when a button is clicked. After i get a list populated, I want the progress bar to disappear. Below is my code: </p>

<pre><code>&lt;div class="progress"&gt;&lt;div class="indeterminate"/&gt;&lt;/div&gt;
if (source_names_list.length == 0)
{
  // want progress bar to appear

}
if (source_names_list.length &gt; 0)
{
   // want the progress bar to disappear
}
</code></pre>

<p>I tried setting the visibility and it doesn't help. i tried adding the progress bar programmatically.</p>
