jquery - How to chain the css3 transition in agularjs -
here scenario,
when user click on button, need increase height of div once div reached height,
from child of div each of span need have opacity:1, sequence (with delay between spans)
how this?
here code , demo:
var myapp = angular.module('myapp', []) myapp.controller('main', function($scope){ $scope.animate = false; $scope.animit = function () { $scope.animate = !$scope.animate; } }) <html> <head> </head> <body ng-app="myapp"> <div ng-controller="main"> <div ng-class="{'active' : animate}"> <span>testing1</span> <span>testing2</span> <span>testing3</span> </div> <button ng-click="animit()">click me</button> </div> </body> </html> update step of required:
- make full height div
divreach full height , start- first
spanfade in , that's done - next
spanfade in so.. - when user clicks again remove
activediv - when
divreducing height, accodingly fade outspanreverse order.
Comments
Post a Comment