<script>\r
\r
$(function() {\r
- \r
+\r
$('#p1-create').click(function() {\r
- \r
+\r
$('#p1').progressbar({\r
- \r
+\r
text: 'jQuery ProgressBar waiting...',\r
- \r
+\r
//addClass: 'ui-progressbar-inner-custom teste',\r
- \r
+\r
//textClass: 'right-align',\r
- \r
+\r
//align: 'right',\r
- \r
+\r
wait: 'loop',\r
- \r
- duration: 2000,\r
- \r
- stepping: 3,\r
- \r
+\r
+ duration: 1000,\r
+\r
+ stepping: 10,\r
+\r
progress: function(range, ui) {\r
//console.log(ui.pixelRange);\r
//console.log(range);\r
//ui.instance.text('Waiting...');\r
},\r
- \r
+\r
stop: function(s, ui) {\r
//console.log('stop:' + ui.instance.inprogress);\r
},\r
- \r
+\r
start: function() {\r
console.log('user start');\r
}\r
- \r
+\r
});\r
- \r
+\r
}).trigger("click");\r
- \r
- \r
+\r
+\r
$('#p2-create').click(function() {\r
- \r
+\r
$('#p2').progressbar({\r
- \r
+\r
range: true,\r
- \r
+\r
wait: 2000,\r
- \r
- duration:1000,\r
- \r
+\r
+ duration:2000,\r
+\r
stepping: 5,\r
- \r
+\r
progress: function(range, ui) {\r
//console.log(ui.pixelRange);\r
//console.log(range);\r
},\r
- \r
+\r
stop: function(s, ui) {\r
//console.log('stop:' + ui.instance.inprogress);\r
},\r
- \r
+\r
start: function() {\r
//console.log('user start');\r
}\r
- \r
+\r
});\r
- \r
+\r
}).trigger("click");\r
- \r
- \r
+\r
+\r
$('#p3-create').click(function() { $('#p3').progressbar({\r
- \r
+\r
duration: 2000,\r
- \r
+\r
stepping: 30,\r
- \r
+\r
stop: function(s, ui) {\r
console.log('stop:' + ui.instance.inProgress);\r
},\r
console.log('user start');\r
}\r
}); }).trigger('click');\r
- \r
+\r
});\r
\r
if(!window.console) {\r
window.console = {\r
log: function() {\r
$('#log').append(arguments[0]+"<br>");\r
- $('#log').scrollTop(999999); \r
- } \r
- }; \r
+ $('#log').scrollTop(999999);\r
+ }\r
+ };\r
}\r
\r
</script>\r