I am in need of assistance with coding (I am still learning, so please excuse any syntax errors).
What I am trying to achieve is having two buttons (button A and button B) that can toggle the visibility of their respective divs (div A and div B), which should function independently. These divs will each take up 50% of the screen width, and depending on the order in which they are clicked, their position should be determined. The first click (whether it's on button A or button B) should display the div 50% width from the right edge of the screen, while the second click (again, regardless of the button) will place the div 50% width from the left edge of the screen.
https://i.sstatic.net/KwGP5.png
I have managed to create a show and hide functionality for the divs, but I'm unsure how to control their positioning based on the order in which their corresponding buttons are clicked...