Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't assign actual value to jQuery UI Progress bar
    text
    copied!<p>I have an issue with jQuery UI Progress bars. I got multiple progress bars on my page (for stacked progress bars indicating a multi-step progress) and I have the following code to initiate the progress bar and assign the value : </p> <pre><code>function createProgressBars(progressVal, progressValMax, callback) { progressVal = $(this).data("progress-value"); progressValMax = $(this).data("progress-val-max"); $(".progress-bar").progressbar({ value : progressVal, max : progressValMax }); callback();} jQuery(function($){ $(document).ready(function(){ $(".progress-bar").each(function(){ var pv = $(this).data("progress-value"), pm = $(this).data("progress-max"); createProgressBars(pv, pm); }); }); }); </code></pre> <p><strong>EDIT : Added HTML Code</strong></p> <pre><code>&lt;div class="progress-bar regular-user" data-progress-value="1000" data-progress-max="3000"&gt;&lt;/div&gt; &lt;div class="progress-bar bronze-user" data-progress-value="500" data-progress-max="2000"&gt;&lt;/div&gt; &lt;div class="progress-bar silver-user" data-progress-value="300" data-progress-max="2000"&gt;&lt;/div&gt; &lt;div class="progress-bar gold-user" data-progress-value="200" data-progress-max="3000"&gt;&lt;/div&gt; </code></pre> <p>But in the HTML attributes I have <code>aria-value-max=100</code> and <code>aria-value-now=0</code> . </p> <p>How can I specify those values correctly? I had the same experience with a progress bar (a single one actually) and it worked fine. </p> <p>Thanks guys.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload