• User Attivo

    javascript su firefox...

    salve a tutti, sto usando un javascrit per un effetto fadin/out su delle foto.. in IE tutto bene, ma firefox non lo vede proprio..
    qualche suggerimento?
    ecco il codice

    <script type="text/javascript" language="JavaScript">
    <!--
    nereidFadeObjects = new Object();
    nereidFadeTimers = new Object();
    /* object - image to be faded (actual object, not name);
     * destop - destination transparency level (ie 80, for mostly solid)
     * rate   - time in milliseconds between trasparency changes (best under 100)
     * delta  - amount of change each time (ie 5, for 5% change in transparency)
     */
    function nereidFade(object, destOp, rate, delta){
    if (!document.all)
    return
        if (object != "[object]"){
            setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
            return;
        }
        clearTimeout(nereidFadeTimers[object.sourceIndex]);
        diff = destOp-object.filters.alpha.opacity;
        direction = 1;
        if (object.filters.alpha.opacity > destOp){
            direction = -1;
        }
        delta=Math.min(direction*diff,delta);
        object.filters.alpha.opacity+=direction*delta;
        if (object.filters.alpha.opacity != destOp){
            nereidFadeObjects[object.sourceIndex]=object;
            nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
        }
    }
    -->
    </script>
    
    
    <img src="image1.jpg" alt="" width="300" height="206" style="filter:alpha(opacity=60)" onMouseOver="nereidFade(this,100,30,5)" onMouseOut="nereidFade(this,60,50,5)">
    

  • User Attivo

    Sei sicuro che non sia solo per IE?


  • User Attivo

    si infatti, era solo per ie 🙂 grazie