Reputation: 11
How can one make dijit.Dialog
to fade in a given time period? Is there any way define it?
I have created above dialog in a method. But I need to call the method frequently. So it will create multiple dialogs. So how to block(not to appear) other dialogs until visible dialog get faded?
Upvotes: 1
Views: 691
Reputation: 3498
<script>
// Require the Dialog class
dojo.require("dijit.Dialog");
// Create counter
var counter = 1;
// Create a new Dialog
function createDialog(first) {
// Create a new dialog
var dialog = new dijit.Dialog({
// Dialog title
title: "New Dialog " + counter,
// Create Dialog content
content: (!first ? "I am a dialog on top of other dialogs" : "I am the bottom dialog") + "<br /><br /><button onclick='createDialog();'>Create another dialog.</button>"
});
dialog.show();
counter++;
} </script> <button onclick="createDialog(true);">Create New Dialog</button>
Upvotes: 1