Solved! Go to Solution.
var slide = function (rightDomId, open, map) { var width = window.innerWidth; var sliderWidth = open ? 250 : 0; var mapWidth = open ? width - 250 : width; fx.animateProperty({ node: rightDomId, properties: { width: sliderWidth }, onEnd: function () { var slider = dom.byId(rightDomId); var visible; if (parseInt(slider.style.width) < 100) { visible = "none"; } else { visible = "block"; } domStyle.set(slider, { display: visible }); } }).play(); fx.animateProperty({ node: map.id, properties: { width: mapWidth }, onEnd: function () { map.resize(); } }).play(); }; var slideIn = function (rightDomId, map) { slide(rightDomId, true, map); }; var slideOut = function (rightDomId, map) { slide(rightDomId, false, map); };
The Lee Council has created a toggle button with click event and which slides in & out the accordion container. Have you checked the sample web application link. Are they using expandopane method. I don't think so.
Did you also check the sample? They are using dojo.animateProperty()
Like Jian said, there are many many ways to accomplish what you desire.
The choice really comes down to you making your own decision based on your immediate needs.
As a developer, the best thing you can do is outline the needs/wants/requirements of a project before starting to code.