There are typical tasks of working with DOM.
Situation 1: An user fills out a form. The user can choose only one option. If the user choose an option "Other", a textarea will be editable. By default, the textarea is disabled.
Situation 2: We have internal navigation (a list of links / bookmarks). We need to save space on the page. Switching between bookmarks is performed by JavaScript code. If we click on a link, we will show an appropriate section and we will hide others.
Situation 3: More information can be shown and then hidden again.
Situation 4: Photo and text editor.
Situation 1: We should add a group of elements with the same html structure but different content.