Created
April 17, 2014 01:20
-
-
Save danielmackay/10946671 to your computer and use it in GitHub Desktop.
Animated expander using ng-show. #angularjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .expander { | |
| -webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) .5s; | |
| -moz-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) .5s; | |
| -o-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) .5s; | |
| transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) .5s; | |
| height: 100px; | |
| } | |
| .expander.ng-hide { | |
| height: 0px; | |
| } | |
| .expander.ng-hide-add, | |
| .expander.ng-hide-remove { | |
| display: block !important; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <button ng-click="toggleAdvanced()">Show Advanced</button> | |
| <div class="expander" ng-show="showAdvanced"> | |
| ADVANCHED SEARCH OPTIONS HERE... | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $scope.showAdvanced = false; | |
| $scope.toggleAdvanced = function() { | |
| $scope.showAdvanced = !$scope.showAdvanced; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment