dojo Standby widget not spinning
http://stackoverflow.com/questions/13936438/dojo-standby-widget-not-spinning
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dijit/themes/claro/claro.css">
<div id="standby">
<div id="btn" data-dojo-type="dijit.form.Button" data-dojo-props="label: 'Go'"></div>
</div>
CSS
#standby {
position: absolute;
top: 50%;
left:50%;
width:32px;
height:32px;
margin-top: -16px;
margin-left: -16px;
/*
width: 300px;
height: 300px;
background-color: #e7e7e7; */
}
JavaScript
require([
"dojo/ready",
"dojo/on",
"dojo/parser",
"dijit/form/Button",
"dojox/widget/Standby"
], function(ready, on, parser, Button, Standby){
ready(function(){
parser.parse();
var standby = new Standby({
id: "standbyObj",
target: "standby",
color: "RED",
text:"Saving Data...",
image:none,
zindex: "auto",
duration: "1000"
});
dojo.body().appendChild(standby.domNode);
standby.startup();
on(dojo.byId('btn'), 'click', function() {
standby.show();
// simulate a request. hide the timeout in 5 seconds
setTimeout(function() {
standby.hide();
}, 5000);
});
});
});