Angular Animation Done Call Back
How do I make an angular animation done call back?
What is a angular animation done call back? How do you make a angular animation done call back? This script and codes were developed by Chris Sargent on 29 November 2022, Tuesday.
Angular Animation Done Call Back - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Angular Animation Done Call Back</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="card" ng-app="myApp" ng-controller="myCtrl"> <button ng-click="toggle()">Collapse The Div Below</button> <div class="collapsible" ng-if="showContent"> This div is collapsible with an auto-height. </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-animate.js'></script> <script src="js/index.js"></script>
</body>
</html>
Angular Animation Done Call Back - Script Codes CSS Codes
.collapsible { border: 1px solid red; padding: 50px; -webkit-transition: none; transition: none; -webkit-animation: none; animation: none; -webkit-transition: 2s ease all; transition: 2s ease all;
}
.collapsible.ng-enter,
.collapsible.ng-leave { -webkit-transition: 1s ease all; transition: 1s ease all; overflow: hidden!important;
}
.collapsible.ng-enter,
.collapsible.ng-leave.ng-leave-active { opacity: 0;
}
.collapsible.ng-leave,
.collapsible.ng-enter.ng-enter-active { opacity: 1;
}
Angular Animation Done Call Back - Script Codes JS Codes
angular.module('myApp', ['ngAnimate'])
.controller('myCtrl', function($scope) { $scope.showContent = false; $scope.toggle = function() { $scope.showContent = !$scope.showContent; }
})
.animation('.collapsible', ['$animateCss', function($animateCss) { return { enter: function(element, doneFn) { console.log('test'); var height = element[0].offsetHeight; var animation = $animateCss(element, { from: { height: '0px' }, to: { height: height + 'px' }, duration: 1, event: "enter", structural: true }); animation.start(); }, leave: function(element, doneFn) { var height = element[0].offsetHeight; var animation = $animateCss(element, { to: { height: '0px' }, from: { height: height + 'px' }, duration: 1, event: "leave", structural: true }); animation.start(); } }
}]);
Developer | Chris Sargent |
Username | ChrisSargent |
Uploaded | November 29, 2022 |
Rating | 3 |
Size | 2,520 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Flexbox Linebreaks V2 | 1,914 Kb |
Speech Bubble, Bg Image | 2,716 Kb |
A Pen by Chris Sargent | 1,483 Kb |
Travis Neilson, Splash Page Flexbox Test | 4,633 Kb |
Checkbox Mobile Nav Toggle Test | 2,295 Kb |
IOS Pure CSS Slide Toggle Checkbox | 2,374 Kb |
Skewed | 2,370 Kb |
Material Card Expand Animation | 6,717 Kb |
Engine Anim Loader | 2,268 Kb |
Triangles using Borders | 1,541 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Alexandru Pora | Axpro | 1,615 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
A Pen by tugce | Ecgutcnkr | 4,197 Kb |
Hexagons | Ashmind | 4,360 Kb |
A Pen by Michael Parenteau | Michaelparenteau | 2,133 Kb |
Drag n Drop | Martin42 | 2,594 Kb |
Two tables and header with jspdf-autotable | Someatoms | 2,245 Kb |
Contact | GanNichiHa | 2,514 Kb |
Use the Twitchtv JSON API | Roksanaop | 3,561 Kb |
Social Profiles | Lachlanjc | 1,939 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!