+ 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 ответов
+ 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