1 $('#progressbar-demo').live('pageshow', function (e) {
3 // set progressbar value...
4 $('#progressbar').progressbar("option", "value", 37);
6 // how to update progressbar..
7 $('#progressbarTest').bind('vclick', function (e) {
9 // request animation frame
10 window.requestAnimFrame = (function(){
11 return window.requestAnimationFrame ||
12 window.webkitRequestAnimationFrame ||
13 window.mozRequestAnimationFrame ||
14 window.oRequestAnimationFrame ||
15 window.msRequestAnimationFrame ||
17 return window.setTimeout(animloop, 1000 / 60);
20 window.cancelRequestAnimFrame = ( function() {
21 return window.cancelAnimationFrame ||
22 window.webkitCancelRequestAnimationFrame ||
23 window.mozCancelRequestAnimationFrame ||
24 window.oCancelRequestAnimationFrame ||
25 window.msCancelRequestAnimationFrame ||
29 // to store the request
34 // start and run the animloop
36 $('#progressbar').progressbar("option", "value", i++);
37 request = requestAnimFrame(animloop);
39 cancelRequestAnimFrame(request);
42 $(this).find('#pending').progress({ running: true });
43 $(this).find('#progressing').progress({ running: true });
45 $('#pendingTest').bind('vclick', function (e) {
46 var running = $('#pending').progress( "option", "running" );
47 // start/stop progressing animation
48 $('#pending').progress( "option", "running", !running );
51 $('#progressingTest').bind('vclick', function (e) {
52 var running = $('#progressing').progress( "option", "running" );
53 // start/stop progressing animation
54 $('#progressing').progress( "option", "running", !running );
58 $('#progressbar-demo').bind('pagehide', function (e) {
59 $(this).find('#pending').progress( "option", "running", false );
60 $(this).find('#progressing').progress( "option", "running", false );