EDIT: I just realized that it is not the complete solution yet. There is a curtain effect, but the bar #section2 is not moving dynamical. I am trying further.
Thanks to your question I have learnt something new. It seems possible. I use Wix Editor.
Assuming you have set up the accordion effect (container expands on mouse click). Add another container (box2 in example) into the expanding container. Then hide box2 and add the following code to the click event: