Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <div class="play" ng-click="animate($event)"></div>
  2.  
  3. $scope.animate = function(event) {
  4. var el = event.srcElement;
  5. angular.element(el).addClass('animate');
  6. $timeout(function() {
  7. angular.element(el).removeClass('animate');
  8. }, 1000);
  9. };
  10.  
  11. .play.animate {
  12. animation:0.5s bounceIn ease;
  13. }
  14.  
  15. this.animated = false;
  16. this.animationToggle = function(){
  17. this.animated = !this.animated;
  18. };
  19.  
  20. <div ng-class="{'play' : ctrl.animate}" ng-click="ctrl.menuToggle()"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement