Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di M@sE
    Registrato dal
    Oct 2001
    Messaggi
    488

    Scroll, con pausa di 3 secondi?

    Salve a tutti, ho questo script a disposizione, vorrei inserire la pausa tra una notizia e l'altra.. sapreste indicarmi dove intervenire? Al momento si stoppa solo passondoci con il mouse sopra..

    codice:
    <div id="contenuto" style=" position:absolute;top:0px;left:0px;display:none">
     
     
    
    <pause>TITOLO 1</pause>
    
    <pause>TITOLO 2</pause>
    
    
    </div>
                  
                  
                  
    </div>
    
    <script language="javascript">
    var content=document.getElementById('contenuto').innerHTML
    															var boxheight=90;var boxwidth='330'; 
    																															var speed=40;
    																															var pixelstep=1;  
    																															var godown=false; 
    																															var vShow = -1;
    																															var vOver = -1;
    									
    
    																															var outer,inner,elementheight,ref,refX,refY;
    																															var w3c=(document.getElementById)?true:false;
    																															var ns4=(document.layers)?true:false;
    																															var ie4=(document.all && !w3c)?true:false;
    																															var ie5=(document.all && w3c)?true:false;
    																															var ns6=(w3c && navigator.appName.indexOf("Netscape")>=0)?true:false;
    																															var txt='';
    																															if(ns4)
    																															{
    																																txt = content;
    																															}
    																															else
    																															{
    																																txt+='<div onmouseover="vOver=1" onmouseout="vOver=-1"  id="ref"  style="position:relative; width:'+boxwidth+'; height:'+boxheight+';  " ></div>';
    																																txt+='<div onmouseover="vOver=1" onmouseout="vOver=-1"  id="outer"  style="position:absolute; width:'+boxwidth+'; height:'+boxheight+'; visibility:hidden;  overflow:hidden" >';
    																																txt+='<div onmouseover="vOver=1" onmouseout="vOver=-1"  id="inner"  style="position:absolute; visibility:hidden; left:4px; top:4px; width:'+(boxwidth-8)+'; overflow:hidden; cursor:default;">'+content+'</div>';
    																																txt+='</div>';
    																															}
    																															document.write(txt);
    
    																															function getElHeight(el)
    																															{
    																																if(!ns4)
    																																{
    																																	if(ie4||ie5)
    																																		return (el.style.height)? el.style.height : el.clientHeight;
    																																	else 
    																																		return (el.style.height)? parseInt(el.style.height):parseInt(el.offsetHeight);
    																																}
    																															}
    
    																															function getPageLeft(el)
    																															{
    																																var x;
    																																if(!ns4)
    																																{
    																																if(ie4||w3c)
    																																{
    																																	x = 0;
    																																	while(el.offsetParent!=null)
    																																	{
    																																		x+=el.offsetLeft;
    																																		el=el.offsetParent;
    																																	}
    																																	x+=el.offsetLeft;
    																																	return x;
    																																}
    																																}
    																															}
    
    																															function getPageTop(el)
    																															{
    																																var y;
    																																if(!ns4)
    																																{
    																																if(ie4||w3c)
    																																{
    																																	y=0;
    																																	while(el.offsetParent!=null)
    																																	{
    																																		y+=el.offsetTop;
    																																		el=el.offsetParent;
    																																	}
    																																	y+=el.offsetTop;
    																																	return y;
    																																}
    																																}
    																															}
    
    
    																															function scrollbox()
    																															{
    																																if(vOver < 0)
    																																{
    																																if(!ns4)
    																																{
    																																	vShow = -vShow;
    																																	
    																																	inner.style.top=parseInt(inner.style.top)+((godown)? pixelstep: -pixelstep)+'px';
    																																	if(godown)
    																																	{
    																																		if(parseInt(inner.style.top)>boxheight)inner.style.top=-elementheight+'px';
    																																	}
    																																	else
    																																	{
    																																		if(parseInt(inner.style.top)<2-elementheight)inner.style.top=boxheight+2+'px';
    																																	}
    																																}
    																																}
    																															}
    
    
    																															window.onresize=function()
    																															{
    																																if(!ns4)
    																																{
    																																	outer.style.left=getPageLeft(ref)+'px';
    																																	outer.style.top=getPageTop(ref)+'px';
    																																}
    																															}
    
    
    																															window.onload=function()
    																															{
    																																outer=(ns4)?vri=1:(ie4)?document.all['outer']:document.getElementById('outer');
    																																inner=(ns4)?vri=1:(ie4)?document.all['inner']:document.getElementById('inner');
    																																ref=(ns4)?vri=1:(ie4)?document.all['ref']:document.getElementById('ref');
    																																elementheight=getElHeight(inner);
    																																if(!ns4)
    																																{
    																																	outer.style.left=getPageLeft(ref)+'px';
    																																	outer.style.top=getPageTop(ref)+'px';
    																																	inner.style.top=((godown)? -elementheight : boxheight)+'px';
    																																	inner.style.clip='rect(0px, '+(boxwidth-4)+'px, '+(elementheight)+'px, 0px)';
    																																	outer.style.visibility="visible";
    																																	inner.style.visibility="visible";
    																																}
    																																setInterval('scrollbox()',speed);
    																															}
    																															</script>

  2. #2
    Utente di HTML.it L'avatar di M@sE
    Registrato dal
    Oct 2001
    Messaggi
    488
    UP

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.