Say I have a number (tens) of DIV elements. Each has a size and a
position but no nominated z-index. There are on screen buttons
which correspondingly show/hide each DIV.
If all the DIVs start off hidden is there a way to make the last
revealed DIV the top most?
Ideally I'd like stack order of the other revealed DIVs not to
change. So with these hidden DIVS
A B C D E F G H I...
if C is revealed then D is, as the only visible DIV, the highest
then if A is revealed, A becomes the highest
and then if H is revealed, E becomes the highest but A will still
be higher than D.
I guess it's a bit like shuffling a deck of cards, in that pulling
a card from the deck and putting it on top doesn't change the
relative order of the other cards.
In Message: <HuWdnX1DGqahenjDnZ2dnUU7-W_NnZ2d@westnet.com.au>
Andrew Poulos <ap_prog@hotmail.com> wrote:
Say I have a number (tens) of DIV elements. Each has a size and a
position but no nominated z-index. There are on screen buttons
which correspondingly show/hide each DIV.
If all the DIVs start off hidden is there a way to make the last
revealed DIV the top most?
Ideally I'd like stack order of the other revealed DIVs not to
change. So with these hidden DIVS
A B C D E F G H I...
if C is revealed then D is, as the only visible DIV, the highest
then if A is revealed, A becomes the highest
and then if H is revealed, E becomes the highest but A will still
be higher than D.
I guess it's a bit like shuffling a deck of cards, in that pulling
a card from the deck and putting it on top doesn't change the
relative order of the other cards.
javascript … move element to the end of it's parent.
https://codepen.io/noneyainvalid/full/MWKeZBY
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 19:28:17 |
Calls: | 6,646 |
Calls today: | 1 |
Files: | 12,190 |
Messages: | 5,327,313 |