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?
3 Answers
+ 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
+ 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>
0
FŅRŅOŅNŅTŅ š& šš/ šøš£šš¦ššš Lover nice but can you give me an example please, maybe with a code. It will really helpš