firefox - JavaScript transition not working but does in CSS -
i'm having problems transition in firefox. works if put :hover on .cover if change height in javascript doesn't make animation... it's going change height of #cover0 0px transition on 0.5s. works in chrome, ie10, safari , opera. why doesn't work in ff? div elements generated innerhtml can see in sample.
html
<div class="box" id="box" onclick="onhit();"> <div class="cover" id="cover0"></div> </div>
css
.cover { background-color: black; height: 150px; -moz-transition: height 0.5s; -webkit-transition: height 0.5s; -o-transition: height 0.5s; transition: height 0.5s; width: 150px; }
javascript
function spawncreeper() { document.getelementbyid("wrapper" + place).innerhtml = "<div class=\"box\" id=\"box\" onclick=\"onhit();\"><div class=\"cover\" id=\"cover0\"></div></div>"; document.getelementbyid("cover0").style.height = "0px"; //open cover covers creeper. }
Comments
Post a Comment