Little problem in js. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Little problem in js.

Why is the door not opening on first click? https://code.sololearn.com/WQ0lUGCK1aSC/?ref=app

22nd Sep 2019, 5:44 PM
šŸ‡ Alex Tușinean šŸ’œ
šŸ‡ Alex Tușinean šŸ’œ - avatar
5 Respostas
+ 3
CSS properties aren't famous for being readable that well. But switching the if cases can work https://code.sololearn.com/W0VvC3Ultg0F/?ref=app
22nd Sep 2019, 6:08 PM
Airree
Airree - avatar
+ 4
Anton Bƶhler but on css I added transform:rotateY(0deg)
22nd Sep 2019, 6:07 PM
šŸ‡ Alex Tușinean šŸ’œ
šŸ‡ Alex Tușinean šŸ’œ - avatar
+ 4
It worked. Thank you Airree ! šŸ˜ Anton Bƶhler thank you for your solutions. šŸ˜Š
22nd Sep 2019, 6:10 PM
šŸ‡ Alex Tușinean šŸ’œ
šŸ‡ Alex Tușinean šŸ’œ - avatar
+ 1
window.onload = function(){ $("#door-face").style.transform = "rotateY(0deg)"; } add this šŸ˜
22nd Sep 2019, 6:02 PM
Anton Bƶhler
Anton Bƶhler - avatar
+ 1
well when i added it it worked first try šŸ¤·ā€ā™‚ļø
22nd Sep 2019, 6:08 PM
Anton Bƶhler
Anton Bƶhler - avatar