Last active
December 22, 2015 22:39
-
-
Save aniruddha-adhikary/6541638 to your computer and use it in GitHub Desktop.
random colors on page like apple :3
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
var colors = ["#27ae60", "#3498db", "#9b59b6", "#34495e", "#d35400", "#D35400"]; //le flatui colors | |
var randomInt = function(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
}; | |
$(document).ready(function(){ | |
var colorint = randomInt(0,5); | |
$("body").css("background-color", colors[colorint]); | |
$(".btn-home-menu").css("color", colors[colorint]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment