Created
February 1, 2016 06:16
-
-
Save anonymous/f4ea6caec051f99d7dd6 to your computer and use it in GitHub Desktop.
This file contains 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
с alert работает без alert нет | |
$(document).ready(function() { | |
var color; | |
var i = 0; | |
function col(i) { | |
color = "rgb(255," + i +',' + i + ")"; | |
$('#y1').css('background-color', color); | |
} | |
function fade(){ | |
i = i + 10; | |
alert (i); | |
setTimeout (col(i), 100); | |
if (i <= 255) {fade ();}; | |
} | |
$('#lens').on('click', function() { | |
if ($('#y1').val('')) { | |
fade (); | |
i = 0; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment