Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JS] MSIE A FireFox, bledne dzialanie
escobar1983
post
Post #1





Grupa: Zarejestrowani
Postów: 198
Pomógł: 0
Dołączył: 31.01.2008

Ostrzeżenie: (0%)
-----


Witam na swojej stronie umiescilem przyciski do przewijania tekstu. Przyciski te dziala pod MSIE ale pod FF juz nie.
Kod
function MyScroll (o)
{
this.z=document.getElementById(o);
this.n=document.getElementById(o+'W');
this.s=this.n.style;
this.l=0;//stoper
this.y=0;//pozycja
this.w=this.n.offsetHeight-this.z.offsetHeight;
this.obj=o+"Ob";
eval(this.obj+"=this");

this.przesun=ScrollPrzesun;
this.stop=ScrollStop;
this.krok=ScrollKrok;

function ScrollPrzesun(k){
  this.stop();
  this.l=setInterval(this.obj+'.krok('+k+')',50);
}
function ScrollStop(){
clearInterval(this.l)
}
function ScrollKrok(k){
if(k<0 && this.y<=0)
{
this.y-=k;
this.s.top=this.y;
}else if(k>0 && this.y >-this.w){
this.y-=k;
this.s.top=this.y;
}
}
}

O to kod z pliku *.js. Moze ktos zna odpowiedz? Pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie
- escobar1983   [JS] MSIE A FireFox   27.02.2008, 09:35:59
- - l0ud   Daj przykład użycia kodu wraz z plikiem html.   27.02.2008, 14:50:41


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 20:57