BRANCH 4.1:
   ensured there is no infinite loop when closing toggled content div