I've done some searching and come up with a lot of mixed results for using Dojo to toggle divs showing vs hidden.
- Some use
dojo.style
which it looks like might have been replaced bydojo.fx
- Some use
dijit
but thus cannot access a DOM node. - Some make use of
show()
andhide()
- Some change the CSS
I can't seem to get any of them to work.
Can someone please point me towards an up-to-date walkthru on this.
Solved
Used a combination of the following...
dojo.addOnLoad(function() {
dojo.style(dojo.byId('myDiv'), "display", "none");
});
and to toggle it
function toggleDivs(){
if( dojo.style(dojo.byId('myDiv'), "display") == "none"){
dojo.style(dojo.byId('myDiv'), "display", "block");
dojo.style(dojo.byId('myDiv2'), "display", "none");
} else {
dojo.style(dojo.byId('myDiv'), "display", "none");
dojo.style(dojo.byId('myDiv2'), "display", "block");
}
}