1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<script type="text/javascript">
var model = {
renderAt: '#containerDemo',
title: 'Progressbar Demos',
demos: [
{
title: 'Simple Progressbar',
desc: 'With few lines of code you could build a progressbar. You can try more options on the fly!',
html: '<div id="progressbar"></div>',
destroy: '$("#progressbar").progressbar("destroy");',
options: [
{ desc: 'Start a progressbar', source: '$("#progressbar").progressbar({interval:2000}); $("#progressbar").progressbar("start");' },
{ desc: 'With different increment', source: '$("#progressbar").progressbar({interval:2000, increment:100}); $("#progressbar").progressbar("start");' },
{ desc: 'Set progress to 50%', source: '$("#progressbar").progressbar("progress", 50);' },
{ desc: 'Loop', source: '$("#progressbar").progressbar({interval:2000}).progressbar("start");' },
{ desc: 'Callback when finish', source: '$("#progressbar").progressbar({interval: 1000, stop:function(){alert("Finished");}}).progressbar("start");' },
{ desc: 'Enable the progressbar', source: '$("#progressbar").progressbar("enable");' },
{ desc: 'Disable the progressbar', source: '$("#progressbar").progressbar("disable");' }
]
}
]
};
$(function(){
uiRenderDemo(model);
});
</script>
|