Closed blimpmason closed 8 years ago
Hey buddy,
Not out-of-the-box, I'm afraid. Try using this as your onToggle
callback:
onToggle: function(target){
target.accordion.folds.forEach(fold => {
if(fold !== target)
fold.open = false;
});
}
I thought to include a modal
option, but wanted the core code to be as minimal as possible. Though I should probably make a note of this snippet in the readme, since modal accordions are that common. =)
Perfect, thanks! Much appreciated.
No problem! Glad I could help. =)
Is there a method I could use on the onToggle callback to collapse all other folds when one is expanded? So if you open one, any open section collapses.