js:

                $$('img.theonly').each(function(el){

                    var imageSrc = (el.getProperty('src'));

                                        alert(imageSrc);

                                        $('box').setStyles({
                                                'background-image' : 
'url(imageSrc)',
                                                'background-repeat' : 'repeat',
                                        });
                });


html:

        <img class="theonly" src="272216.jpg" alt="image">
        <div  id="box"></div>

I'm getting image source file in alert box correct, but I cant figure
out how to put it as a background on another div.
Unfortunately it doesn't work the way I'm doing it.. Is there other
way to make it happen?

Reply via email to