Semantic-ui: Setting Progress Bar Value

Created on 5 Dec 2016  路  6Comments  路  Source: Semantic-Org/Semantic-UI

Hello. There seems to be an issue with setting a progress bar. Increment and decrement seem to work.

$('.progress').progress('increment', 70);

or

$('.progress').progress('decrement', 30);

Are working just fine. Personally I need to set this value.

$('.progress').progress('set', 40);

or anything like that does not work. I've also tried value instead of set. Please tell me if there is an issue with me or Semantic UI. I am on the latest version 2.2.6

Usage Question

Most helpful comment

$('.progress').progress('set progress', progress);

All 6 comments

By looking at the source code of Semantic UI I ended up making a make shift function to do this.

function setProgress(element, value) {
    $(element).attr("data-percent", value);
    $(element + ' .bar').css("width", value + "%");
    $(element + ' .bar .progress').text(value + "%")
}

I was still wondering if you could fix this. Thanks

Sorry devrchancay, that is just initiation. I need to constantly change this value.

http://semantic-ui.com/modules/progress.html#/usage

set percent(percent) | Sets current percent of progress to value. If using a total will convert from percent to estimated value.
------------ | -------------

?

$('.progress').progress('set progress', progress);

Hi @AdamMikacich, is the issue still standing?

Closing the issue until there鈥檚 a reply.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mllamazares picture mllamazares  路  3Comments

batata004 picture batata004  路  3Comments

arj-196 picture arj-196  路  3Comments

iPaoo picture iPaoo  路  3Comments

zhaoyao91 picture zhaoyao91  路  3Comments