Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: slinkimas i sonus (javascript)

Parašė Creatium· 2007 Gru. 29 22:12:05
#1

Sveiki, radau as toki skripta, kurio pagalba jeigu rasant i tam tikro didzio langa ir prirasant daugiau nei tas langas uzima yra galimybe uzejus ant tam tikro img paslinkti visa teksta virsun ar zemyn. Nu tie kurie ismano supras is skripto. Tai va, as noriu, kad pas mane butu ne zemyn ar i virsu, o kairen ar i desine. Va skriptas:

<td width='414' height='298' b colspan='2' rowspan='5' bgcolor='#000000'><table align='center' width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td valign='top'><li><span class='style2'>tekstas tekstas </span></li><br><script type="text/javascript">

iens6=document.all||document.getElementById
ns4=document.layers

//specify speed of scroll (greater=faster)
var speed=5

if (iens6){
document.write('<div id="container" style="position:relative;width:410px;height:195px;border:0px solid black;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:410px;left:0;top:0">')
}
</script>

<ilayer name="nscontainer" width=410 height=195 clip="0,0,175,160">
<layer name="nscontent" width=410 height=195 visibility=hidden>
<span class='style3'>tekstas tekstas tekstas <br>
tekstas tekstas tekstas <br>
</span></layer></ilayer><script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>

<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}

function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)

}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
<table border="0" cellpadding="0" cellspacing="0" width="100%"><td><p align="right"><a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="img url" border=0></a>  <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="img url" border=0></a></td></table></td></tr></table></td><td rowspan='5' style='background-image:url(img url); border:0;' width='17' height='298'></td><td><img src='img url' width='1' height='43'  /></td></tr>