Created
June 4, 2014 20:12
-
-
Save dlabey/609e34773415fb73fd0c to your computer and use it in GitHub Desktop.
Angular Slide Vertically Directive
This file contains 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
// Requires jquery.js, jquery.ui.effect.js, jquery.ui.effect-slide.js | |
// Usage: ng-slide-vertically="scopeVariable" | |
angular.module('namespace').directive('ngSlideVertically', function() { | |
return function(scope, element, attr) { | |
scope.$watch(attr.ngSlideVertically, function ngSlideVerticallyWatchAction(value){ | |
if (value) { | |
$(element).show('slide'); | |
} else { | |
$(element).hide('slide'); | |
} | |
}); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment