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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -