I am trying to implement an animation on click in the following fiddle: My Fiddle
var animating = false;
rotateDoor = function() {
if (animating)
return;
var door = $('#door');
animating = true;
openDoor(door, 5);
};
openDoor = function(door, angle) {
if (angle >= 90) {
animating = false;
return;
}
door.css('-webkit-transform', 'perspective(200px) rotateY( ' + angle + 'deg )');
door.css('-moz-transform', 'perspective(200px) rotateY( ' + angle + 'deg )');
setTimeout(function() {
openDoor(door, angle += 1);
}, 20);
};
});
I have added the Zoomooz js plugin externally in the fiddle and there seems to some lag issue in the animation after the door has closed.(Only in firefox.)
My firefox version is 26.0,Mozilla Firefox for ubuntu canonical 1.0
Update:Its not a door issue alone,firefox picks up Zoomooz and is very slow in firefox.