Here is a specific code snippet I'm working with: https://jsfiddle.net/uyg8tauo/. In this snippet, multiple div
elements are initially set to display: none;
. My goal is to make them appear by changing the display
property to block
when the corresponding buttons are clicked.
The challenge I face is ensuring that the elements cascade properly based on the button clicks. For example, clicking the first button multiple times should reveal elements with id
s of "school_" + n
one after another. Similarly, clicking the second button should cause the div
with id
"noSchool_" + n
to appear after the previously revealed elements, not in its initial DOM position.
It's important to note that this solution needs to work on older browsers like IE8< and that the div
elements must be pre-defined, without dynamic addition. Any help or feasible solutions would be greatly appreciated!
Thank you.