destroy: '$("#progressbar").progressbar("destroy");',\r
options: [\r
{ desc: 'Start a progressbar', source: '$("#progressbar").progressbar({interval:2000}); $("#progressbar").progressbar("start");' },\r
- { desc: 'With different increment', source: '$("#progressbar").progressbar({interval:2000, increment:100}); $("#progressbar").progressbar("start");' },\r
- { desc: 'Set progress to 50%', source: '$("#progressbar").progressbar("progress", 50);' },\r
- { desc: 'Loop', source: '$("#progressbar").progressbar({interval:2000}).progressbar("start");' },\r
+ { desc: 'With different increment', source: '$("#progressbar").progressbar({interval:2000, increment:100}).progressbar("start");' },\r
+ { desc: 'Set progress to 50%', source: '$("#progressbar").progressbar().progressbar("progress", 50);' },\r
{ desc: 'Callback when finish', source: '$("#progressbar").progressbar({interval: 1000, stop:function(){alert("Finished");}}).progressbar("start");' },\r
- { desc: 'Enable the progressbar', source: '$("#progressbar").progressbar("enable");' },\r
- { desc: 'Disable the progressbar', source: '$("#progressbar").progressbar("disable");' }\r
+ { desc: 'Enable the progressbar', source: '$("#progressbar").progressbar().progressbar("enable");' },\r
+ { desc: 'Disable the progressbar', source: '$("#progressbar").progressbar().progressbar("disable");' }\r
]\r
}\r
\r
{ desc: 'Make a spinner', source: '$("#spinner").spinner();' },\r
{ desc: 'A spinner with min and max value', source: '$("#spinner").spinner({min:-100, max:150});' },\r
{ desc: 'Big stepping', source: '$("#spinner").spinner({stepping:100});' },\r
+ { desc: 'Currency option', source: '$("#spinner").spinner({currency:"$"});' },\r
{ desc: 'Disable incremental option', source: '$("#spinner").spinner({incremental:false});' },\r
- { desc: 'Enable the spinner', source: '$("#spinner").spinner().attr("disabled","");' },\r
- { desc: 'Disable the spinner', source: '$("#spinner").spinner().attr("disabled","disabled");' }\r
+ { desc: 'Enable the spinner', source: '$("#spinner").spinner().spinner("disable");' },\r
+ { desc: 'Disable the spinner', source: '$("#spinner").spinner().spinner("enable");' }\r
]\r
}\r
\r
$.widget("ui.progressbar", {\r
_init: function() {\r
\r
- $.extend(this.options, {\r
- _interval: this.options.interval\r
- });\r
+ this._interval = this.options.interval;\r
\r
var self = this,\r
options = this.options,\r
plugins: {},\r
ui: function(e) {\r
return {\r
- instance: this,\r
identifier: this.identifier,\r
options: this.options,\r
element: this.bar,\r
this.bar.width(0);\r
this.textElement.width(0);\r
this.bar.addClass('ui-hidden');\r
- this.options.interval = this.options._interval;\r
+ this.options.interval = this._interval;\r
this._propagate('stop', this.ui());\r
},\r
progress: function(percentState) {\r