diff options
Diffstat (limited to 'src/ng/animate.js')
| -rw-r--r-- | src/ng/animate.js | 23 | 
1 files changed, 23 insertions, 0 deletions
| diff --git a/src/ng/animate.js b/src/ng/animate.js index fa5b936d..1961d47b 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -222,6 +222,29 @@ var $AnimateProvider = ['$provide', function($provide) {          done && $timeout(done, 0, false);        }, +      /** +       * +       * @ngdoc function +       * @name ng.$animate#setClass +       * @methodOf ng.$animate +       * @function +       * @description Adds and/or removes the given CSS classes to and from the element. +       * Once complete, the done() callback will be fired (if provided). +       * @param {jQuery/jqLite element} element the element which will it's CSS classes changed +       *   removed from it +       * @param {string} add the CSS classes which will be added to the element +       * @param {string} remove the CSS class which will be removed from the element +       * @param {function=} done the callback function (if provided) that will be fired after the +       *   CSS classes have been set on the element +       */ +      setClass : function(element, add, remove, done) { +        forEach(element, function (element) { +          jqLiteAddClass(element, add); +          jqLiteRemoveClass(element, remove); +        }); +        done && $timeout(done, 0, false); +      }, +        enabled : noop      };    }]; | 
