]> dev.renevier.net Git - syj.git/blob - public/js/highlight.js
highlight for input on errors
[syj.git] / public / js / highlight.js
1 Element.addMethods({
2     highlight: function(element, color, timeout) {
3         var current;
4         if (typeof timeout === "undefined") {
5             timeout = 0.3;
6         }
7         current = element.getStyle('backgroundColor');
8         Element.setStyle(element, {'backgroundColor': color});
9         Element.setStyle.delay(timeout, element, {'backgroundColor': current});
10         return element;
11     }
12 });