I am trying to animate an element and make it appear on button click. The below code works perfectly fine in Chrome, but doesn't work for Mozilla Firefox. Any help is greatly appreciated.
Thanks
CSS Class for animation:
.moz-trial{
-moz-animation:moz-trial 2s;
-webkit-animation: moz-trial 1s;
}
@-webkit-keyframes moz-trial {
0% {
opacity: 0;
-moz-transform: translateX(-20px);
-webkit-transform: translateX(-20px);
}
50% {
opacity: 0.8;
-moz-transform: translateX(+20px);
-webkit-transform: translateX(+20px);
}
100% {
opacity: 1;
-moz-transform: translateX(0px);
-webkit-transform: translateX(0px);
}
}
My JS code on button click:
$('#open_drawer').on('click',function(){
$('#questions_menu_drawer').removeClass('hidden').addClass('moz-trial');
});
Example - http://jsfiddle.net/88ogrojy/