Run script
General Discussion
5
Posts
2
Posters
1.1k
Views
2
Watching
-
Hello,
I need run this script every time you recharge the site. Change the body background-color and background-color in H1<script>
$(document).ready(function(){
var colors = ['#ff7175','#9fdded', '#ffcccc', '#f9f3a0', '#aeeadd', '#ded3e7', '#e0dcd4'];
$("body").each(function()
{
$(this).css('background-color', colors[Math.floor(Math.random()*colors.length)]);
$('h1').css('background-color', colors[Math.floor(Math.random()*colors.length)]);
});
});
</script>Any idea? when recharge the site the theme put the colors of the preferences.
Thanxs a lot!
-
Hey dnlbrv!
Please take a look at this:
http://laythemeforum.com/topic/674/random-color-backgroundAnd you need to use "jQuery" instead of "$"
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com
