Below I have a script that loads images in a random order and flies them onto the screen beside each other. You can find the script here:
https://jsfiddle.net/38e126f4/
I would now like to be able to add different random CSS3 transition effects to each image as they fly onto the screen. I tried using the step function to no avail.
step: function(now, fx) {
var num = Math.floor((Math.random() * 2) + 1);
switch(num) {
case(1):
$(".av_icon_"+index).css("opacity", "0.5");
break;
case(2):
$(".av_icon_"+index).css('-webkit-transform','rotate(0deg) scale(1) skew('+now+'deg) translate(0px)');
break;
}
},
When I add this function, it nulls all animations and makes all images transparent with a crazy css transform effect.
What is the best way to add neat transitions to these images?
$(".av_icon_"+index).css("opacity", "0.5");is seting transparency to half, it is not an animation.. This is why you see them transparent