Randomized background on refresh
I'm using this script as below:
var totalCount = 8;
var num = Math.ceil( Math.random() * totalCount );
document.body.background = 'bgimages/'+num+'.jpg';
document.body.style.backgroundRepeat = "repeat";// Background repeat
What do I have to add in document.write any ideas? I would also need it to work across all browsers and mobile platform. If this doesn't work any Jquery or HTML5 tutorials on this? Please help! Thanks much :)
I don't have the link to it, now, but there is a library that you can use to make the background image full size and scalable with browser size changes.
I think this is it. It's been a while. It does require jQuery.
|All times are GMT +1. The time now is 03:48 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.