Why isn't the opacity transitioning in Chrome? I only want it to fade in with the 'transitions' class without fading out first.
Check out this code sample: http://jsfiddle.net/chovy/t37k3/9/
<div></div>
<a href="#" class="start">start</a>
div {
width: 100px;
height: 100px;
background: #f00;
}
div.transitions {
-moz-transition: opacity 1s, -moz-transform 1s;
-webkit-transition: opacity 1s, -webkit-transform 1s;
-o-transition: opacity 1s, -o-transform 1s;
transition: opacity 1s, transform 1s;
}
$(".start").click(function(e){
e.preventDefault();
$("div").css('opacity', 0).addClass('transitions').css('opacity', 1);
});
Note: Don't forget the class on the anchor and consider using inline opacity for practical use.
Here's a solution I found helpful: