Use $. fn. progressbar. defaults to override defaults.
Dependency
None
Usage example
Create ProgressBar
ProgressBar can be created from html tags or programmed. It is easier to create a tag by adding the 'easyui-ssssbar' class to the <div/> tag.
Copy codeThe Code is as follows: <div id = "p" class = "easyui-progressbar" style = "width: 400px;"> </div>
Get or set the value
We get the current value and set a new value for this component.
Copy codeThe Code is as follows:
Var value = $ ('# p'). progressbar ('getvalue ');
If (value <100 ){
Value + = Math. floor (Math. random () * 10 );
$ ('# P'). progressbar ('setvalue', value );
}
Features
Name |
Type |
Description |
Default Value |
Width |
String |
SetProgressbar. |
Auto |
Value |
Number |
Percentage value. |
0 |
Text |
String |
The template of the text displayed on the component. |
{Value} % |
Event
Name |
Parameters |
Description |
OnChange |
NewValue, oldValue |
Triggered when the value changes. |
Method
Name |
Parameters |
Description |
Options |
None |
ReturnOptionsObject. |
Resize |
Width |
Adjust the component size. |
GetValue |
None |
Returns the current progress value. |
SetValue |
Value |
Set a new progress value. |