0

Please how do you create multiple pages in one sololearn project?

I want to create a new page in an existing html project in Sololearn code playground, is it possible?

28th Jun 2020, 10:07 AM
Express
Express - avatar
3 Respostas
+ 3
Why dont you create different root containers using div tag and fire the event of visibility none and visible when the buttons are pressed
28th Jun 2020, 10:19 AM
Ayush Kumar
Ayush Kumar - avatar
+ 1
A solution with switchig between two div elements as follows. This can of course be controlled with user interaction. <body> <button onclick="aSwitch()">Switch between a and b DIVs</button> <br/><br/> <div id="aDiv" style="top:100px; left:10; width: 400px; height: 300px; position: fixed; background-color: darkCyan; color: lime"> This is aDiv element </div> <div id="bDiv" style="top:100px; left:10; width: 300px; height: 300px; position: fixed; background-color: lime; visibility: hidden"> <center>This is bDiv element</center> </div> <script> function aSwitch() { var a = document.getElementById('aDiv'); var b = document.getElementById('bDiv'); if (a.style.visibility === 'hidden') { b.style.visibility = 'hidden'; a.style.visibility = 'visible'; } else { a.style.visibility = 'hidden'; b.style.visibility = 'visible'; } } </script> </body>
28th Jun 2020, 11:55 AM
JaScript
JaScript - avatar
0
F҉R҉O҉N҉T҉ 🔚& 🔙🔚/ 𝔸𝕣𝕕𝕦𝕚𝕟𝕠 Lover nice but can you give me an example please, maybe with a code. It will really help🙏
28th Jun 2020, 10:21 AM
Express
Express - avatar