Last active
July 2, 2016 12:47
-
-
Save DrLulz/0d9fdefca9cb0bc722fecb67dcc0afa2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // http://stackoverflow.com/questions/967815/how-do-you-fade-in-out-a-background-color-using-jquery | |
| //Color row background in HSL space (easier to manipulate fading) | |
| $('tr').eq(1).css('backgroundColor','hsl(0,100%,50%'); | |
| var d = 1000; | |
| for(var i=50; i<=100; i=i+0.1){ //i represents the lightness | |
| d += 10; | |
| (function(ii,dd){ | |
| setTimeout(function(){ | |
| $('tr').eq(1).css('backgroundColor','hsl(0,100%,'+ii+'%)'); | |
| }, dd); | |
| })(i,d); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment