It’s unusual to require all tabs be toggled. If you had item 1,3,4 open and 2,5 collapsed, your code will result in 1,3,4 closed and 2,5 opened. Obviously I missed something.
Doesn’t encounter do jquery-ui tabs vs highly complex load mechanism of demographics. Not sure how mere expand/collapse does anything. But if it helps, you can look at our approach.
Best.