Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. (function() {
  2. "use strict";
  3. angular.module('akamai.components.tableRowHighlight', [])
  4. .directive("tableRowHighlight", tableRowHighlight);
  5.  
  6. function tableRowHighlight() {
  7. return {
  8. restrict: "A",
  9. scope: {
  10. tableRowHighlight: '='
  11. },
  12. link: function(scope, element, attrs) {
  13. scope.$watch('tableRowHighlight', function(value) {
  14. if(scope.tableRowHighlight===true){
  15. element = $('table').last().children('tbody').find("tr")[0];
  16. element.css("background-color", "red");
  17. setTimeout(function() {
  18. element.css("background-color", "aqua").effect("highlight", {}, 3000);
  19. }, 2000);
  20. }
  21. });
  22. }
  23. };
  24. }
  25. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement