I have two <div>
's that users toggle between them with a checkbox
. if the checkbox is checked, the first <div>
is open. if the checkbox
is unchecked, the second <div>
should be shown.
The thing is this has to happen in animation, and specifically the closing animation must happen first, and only when it's done, the opening animation should start
here is the idea without animation: http://jsfiddle.net/HB7LU/11597/
<div ng-controller="Ctrl">
<div class="first" ng-show="first"></div>
<p><input type="checkbox" ng-model="first" />First open</p>
<div class="second" ng-show="!first"></div>
</div>
var myApp = angular.module('myApp',[]);
myApp.controller('Ctrl',['$scope' ,function($scope) {
$scope.first = true;
}])