As soon as my page loads, I have a div
set to display:block
and another div
set to display:none
.
I have implemented a toggle switch that should replace the visible div with the hidden one.
However, I am facing an issue where after performing the switch, I lose reference to the replaced div
and cannot toggle between them.
Due to the different layout on Desktop, I cannot position the Divs beside each other in the HTML. So, I am exploring options to switch positions and hide the one being replaced.
If you would like to take a look at my work so far, you can check out my Fiddle here:
http://jsfiddle.net/javacadabra/mdqmto9u/
Your assistance would be highly appreciated.
I attempted cloning the divs before switching them, but unfortunately, that approach did not yield the desired result either.
In my fiddle demo, the goal is for the LEFT div to switch positions with the RIGHT div when the box is checked.