I am working with the following HTML code:
<div class="container w-xxxl w-auto-xs " ng-controller="SurveyQuizController">
<div class="panel box-shadow fade-in-right " style="opacity: 0.9" ng-repeat="question in questions" ng-show="current_question == $index">
<div class="panel-heading b-b">
<h1 class="h2 margin-none">{{question.question.question}}?</h1>
</div>
<div class="panel-body">
<div class="form-group">
<multiple ng-show="question.question.question_type_id == 1"></multiple>
</div>
</div>
<div class="panel-footer text-center">
<strong class="small">{{$index+1}} out of {{questions.length}} questions</strong>
<div class="clear">
<a class="btn btn-default pull-left {{$index == 0 ? 'disabled' : ''}}" ng-click="previousQuestion()">Prev</a>
<a class="btn btn-primary pull-right" ng-click="nextQuestion()">Next</a>
</div>
</div>
</div>
</div>
Every panel within this code contains the class fade-in-right
, which is defined as follows:
.fade-in-right.ng-enter {
-webkit-animation: fadeInRight 0.5s;
animation: fadeInRight 0.5s;
}
.fade-in-right.ng-leave {
-webkit-animation: fadeOutLeft 0.5s;
animation: fadeOutLeft 0.5s;
}
Interestingly, when an element is hidden using ng-show
, the animation associated with the class does not trigger.
Could someone shed some light on why this might be happening?