Skip to content

Instantly share code, notes, and snippets.

@aniruddha-adhikary
Last active December 22, 2015 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha-adhikary/6541638 to your computer and use it in GitHub Desktop.
Save aniruddha-adhikary/6541638 to your computer and use it in GitHub Desktop.
random colors on page like apple :3
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