As title, please see this fiddle:
http://jsfiddle.net/goodwill/ezNuj/
Which I have added a directive with following code:
myApp.directive('ngFadeIn', function() {
return function(scope, element, attr) {
if (element.is('tr, tbody')) {
element.find('td').effect("highlight", {}, 500);
} else {
element.effect("highlight", {}, 500);
}
return scope.destroy = function(complete) {
return element.fadeOut(500, function() {
if (complete) {
return complete.apply(scope);
}
});
};
};
});
The problem I have is when the page is first loaded, because I have applied the directive in the ng-repeat element, all the items got highlight effect (flashing once) when the page is first loaded. How can I skip this effect without too much hack (ideally, everything done inside the directive)