I have a page that includes elements like these:
<div id="1" style="display: block;">
[...]
</div>
<div id="2" style="display: none;">
[...]
</div>
<div id="3" style="display: none;">
[...]
</div>
<button id="next" onclick="ScrollNext()">
<button id="previous" onclick="ScrollPrevious()">
When a user clicks "next", I want to determine which [div] is currently showing as "display: block;" modify that [div]'s style to "display: none;", and then modify the next sequential [div]'s style to "display: block;" (and of course I want to do the opposite when the user clicks the "previous" button)
I know how to write code for a button to toggle a single element this way, but how can I determine programmatically which element's style to modify?