On 8/24/05, Bennie, Jack <[EMAIL PROTECTED]> wrote: > Does anyone know any neat code [JScript/CSS - not PHP] that can randomly > load a selection of images into the 'background-image' selector?
Should be simple. Merely dig up any decent image fade script and replace the 'image swap' with this: //obj = element whose BG you wish to animate //newImage = 'images/foo.jpg'; obj.style.backgroundImage = newImage; You may find that you need to pre-load the image in an <img /> element (created within DOM, but not displayed), so that the background is not initially blank when the script switches the background image src. hope that helps :) Andrew. -------------------------------- http://leftjustified.net/ ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
