|
Post by Zaxinou on Jul 6, 2011 12:12:41 GMT 10
This code was made by iAlex and I'm reposting here.
This will allow you to have random backgrounds displayed on your board. Edit the red text with either a colour or image URL. One of these will then be randomly selected when the pages is refreshed. You can have a combination of background colours and background images. Global Header. Cross Browser. Proboards.
<script type="text/javascript"> <!-- /*Open Source*/ var iBackground_List=[ " FF0000", " www.imagehost.com/image.gif", " Colour or URL", " Colour or URL" //No comma on last line ]; var iRandom_Number=iBackground_List[(Math.floor(Math.random()*iBackground_List.length))]; var iBody_Background=document.body.style; (iRandom_Number.match(/http|www/))? iBody_Background.backgroundImage='url('+iRandom_Number+')' : iBody_Background.backgroundColor=iRandom_Number; //--> </script>
|
|