Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    due xfade nella stessa pagina

    http://javascript.html.it/articoli/l...ffetto-fade/2/

    vorrei averne due nella stessa pagina

    ho provato a mettere div class="slideshow" invece di usare id

    nel js ho cambiato così:
    codice:
     
    window.addEventListener?window.addEventListener('load',so_init,false):window.attachEvent('onload',so_init);
    
    var d=document, imgs = new Array(), zInterval = null, current=0, pause=false;
    
    
    function so_init()
    {
            /*if(!d.getElementById || !d.createElement)return;*/
            if(!d.getElementByClass || !d.createElement)return;
            css = d.createElement('link');
            css.setAttribute('href','slideshow2.css');
            css.setAttribute('rel','stylesheet');
            css.setAttribute('type','text/css');
            d.getElementsByTagName('head')[0].appendChild(css);
    
            /*imgs = d.getElementById('rotator').getElementsByTagName('img');*/
            imgs = d.getElementByClass('rotator').getElementsByTagName('img');
            for(i=1;i<imgs.length;i++) imgs[i].xOpacity = 0;
            imgs[0].style.display = 'block';
            imgs[0].xOpacity = .99;
    
            setTimeout(so_xfade,3000);
    }
    ma così non funziona neanche il primo, avete dei suggerimenti?

  2. #2

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.