Here is the structure of my HTML:
<nav id="card-set-menu-nav" ng-style="cardSetMenuNavStyle">
...
</nav>
In my Javascript code using AngularJS, I have a function called openCardSetMenu
:
$scope.openCardSetMenu = function(cardSet) {
$scope.cardSetMenuNavStyle = {'transition':'0.25s', 'left':'100%'};
$scope.cardSetMenuNavStyle = {'transition':'0.25s', 'left':'50%'};
};
I am trying to create a simple side menu by manipulating the $scope.cardSetMenuNavStyle
variable.
The HTML element card-set-menu-nav
starts at left:100%
and then moves to left:50%
.
However, I am encountering an issue where the element does not move after the initial transition. It seems like the transitions are being ignored because the end result remains the same.
Is there a way to implement multiple CSS transitions on an HTML element?
Additionally, it appears that only the last transition applied due to the duration set for each one.