How can I set CSS using javascript (I don’t have access to the CSS file)?
#fade div {
-webkit-transition: opacity 1s;
-moz-transition: opacity 1s;
-o-transition: opacity 1s;
-ms-transition: opacity 1s;
transition: opacity 1s;
opacity: 0;
position: absolute;
height: 500px;
width: 960px;
}
For example:
document.getElementById('fade').HOW-TO-TYPE-webkit-transition = 'opacity 1s';
You should look here: http://www.javascriptkit.com/javatutors/setcss3properties.shtml
As you can see setting CSS Properties with “-” just results in the next character to be capital: