panel-animate-js-source.mustache revision 04d20331c4b5af717b17a6d9e70f79dda460a3fc
YUI().use("transition", "panel", function(Y) {
var openBtn = Y.one('#openButton'),
panel = new Y.Panel({
srcNode: "#panelContent",
width:330,
xy: [300, -300],
modal:true,
visible:false,
zIndex: 5,
buttons: [
{
value: "Close the panel",
action: function(e) {
hidePanel();
},
section: "footer"
}
],
render:true
}),
bb = panel.get('boundingBox');
openBtn.on('click', function(e) {
showPanel();
});
function showPanel () {
panel.show();
duration: 0.5,
top:"80px"
});
}
function hidePanel () {
duration: 0.5,
top:"-300px"
}, function() {
panel.hide();
});
}
});