There is a simple script that allows you to open a popup window on the page. Tell me how you need to change this script so that with its help you can open several popup windows on the page?
Prepared an example:
#Fpp-background { display: none; position: fixed; z-index: 100; opacity: 0.8; overflow: auto; left: 0; right: 0; top: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.925); } #Fpp-window { display: none; background: #fff; position: fixed; z-index: 200; height: auto; margin: 70px auto; text-align: center; overflow-y: auto; left: 0; right: 0; top: 0; bottom: 40px; } <script type="text/javascript"> //Функция показа function show(state){ document.getElementById('Fpp-window').style.display = state; document.getElementById('Fpp-background').style.display = state; } </script> <div onclick="show('none')" id="Fpp-background"></div> <!--01--> <div id="Fpp-window"> <p>Hide text</p> <button onclick="show('none')">Close</button> </div> <a href="#open" onclick="show('block')"><!--Открыть--> <p>Click open 01</p> </a> <!--02--> <div id="Fpp-window"> <p>Hide text 02</p> <button onclick="show('none')">Close</button> </div> <a href="#open" onclick="show('block')"><!--Открыть--> <p>Click open 02</p> </a> Here, Click open 01 works as it should. And Click open 02 is gone. I suspect that the task is very simple for those who know javascript.