Tuesday, 17 September 2013

How to Dynamically assign value to Dojo's object

How to Dynamically assign value to Dojo's object

I am tring to implement TooltipDialog with Dojo, Although the dialog shows
up great,But I still have no idea how to change the content of the tip, I
have code as following:
var _tipContent;
require([
"dijit/TooltipDialog",
"dijit/popup",
"dojo/on",
"dojo/dom",
"dojo/domReady!"
], function (TooltipDialog, popup, on, dom) {
var myTooltipDialog = new TooltipDialog({
id: 'myTooltipDialog',
style: "width: 300px;",
content: _tipContent,
onMouseLeave: function () {
popup.close(myTooltipDialog);
}
});
on(dom.byId('TriggerBlock'), 'mouseover', function () {
popup.open({
popup: myTooltipDialog,
around: dom.byId('TriggerBlock')
});
});
});

No comments:

Post a Comment