Hello everyone
I add the following code to my PG :
const div = document.createElement('div');
div.className = "sidenav"
div.id = "mySidenav"
const link = document.createElement('a')
link.className = "closebtn"
link.setAttribute('onclick','closeNav()')
div.appendChild(link)
document.body.appendChild(div)
console.log(div)
const span = document.createElement('span');
span.setAttribute('onclick','openNav()')
span.style.fontSize = "30px";
span.style.cursor = "pointer"
span.appendChild(document.createTextNode('hello'))
console.log(span)
document.body.appendChild(span)
const header1 = document.createElement('h1');
header1.appendChild(document.createTextNode('Animate'))
document.body.appendChild(header1)
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
}
but I cannot see anything.
what. is the problem?
here is my PG: https://playground.babylonjs.com/#XB49NT#17