How can I make an animation run more than once when a button is clicked? I've tried using ng-class but it's not working as expected. Any help would be appreciated. Thank you!
<div ng-controller="MyCtrl">
<div class='contendor_portafolio' class='next'>
<video id='video' width="320" height="240" ng-class='transicion' controls>
<source src="video.mp4" type="video/mp4" />
</video>
</div>
<button ng-click="fn_transicion()">again</button>
var myApp = angular.module('myApp',[]);
function MyCtrl($scope) {
$scope.fn_transicion= function(sentido){
$scope.transicion="next";
}
}
#video{
width: 98%;
height: 100%;
transition: all linear 0.5s;
background:blue;
-webkit-animation: next 1s 1; /* Safari 4+ */
}
@-webkit-keyframes next {
25% {
-webkit-transform: translateX(1700px);
}
50% {
opacity: 0;
-webkit-transform: translateY(-2000px);
display: none;
}
60% {
-webkit-transform: translateX(-1700px);
}
100%{
}
}
I need use ng-class.