require(["dojo/_base/declare","dojox/layout/FloatingPane", "dojo/dom", "dojo/ready", "dijit/form/Button"], function(declare, FloatingPane, dom, ready, Button) {
ready(function() {
var CustomFloatingPane = declare(FloatingPane, {
close: function(e) {
this.hide();
}
});
myCustomloatingPane = new CustomFloatingPane({
title: "A floating pane",
resizable: true,
dockable: true,
style: "position:absolute;top:0;left:0;width:100px;height:100px;visibility:hidden;",
id: "myCustomloatingPane"
}, dom.byId("customFloatingPane"));
myCustomloatingPane.startup();
});
});
<script type="text/javascript">
dojoConfig = {
isDebug: true,
async: true,
parseOnLoad: true
}
</script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script>
<link href="//ajax.googleapis.com/ajax/libs/dojo/1.8.3/dijit/themes/claro/claro.css" rel="stylesheet" />
<link href="//ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojox/layout/resources/ResizeHandle.css" rel="stylesheet" />
<link href="//ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojox/layout/resources/FloatingPane.css" rel="stylesheet" />
<body class="claro">
<div id="customFloatingPane">Hi I'm custom floating pane , extended to hide istead of destroy and close :) </div>
</body>
<div data-dojo-type="dijit.form.Button" data-dojo-props="label:'Show me', onClick:function(){myCustomloatingPane.show();}"></div>
<br/><br/><br/><br/>