carico le immagini e creo le thumbs con php
e utilizzo queste 3 funzioni in javascript per farle scorrere assieme al loro nome..
in ie7 funziona mentre in ff e crhome mi visualizza le immagini ma non le fa scorrere!!!!! che ***** c'è che nno va !!!!
function init() {
allpicturewidth=document.getElementById('emptypicturediv').offsetWidth
document.getElementById('picturediv').style.top=scrollertop
document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth
clipleft=0
clipright=0
cliptop=0
clipbottom=scrollerheight
document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.getElementById('picturediv').style.visibility="visible"
scrollpicture()
}
function scrollpicture() {
if (parseInt(document.getElementById('picturediv').style.left)>=scrollerleft-allpicturewidth) {
document.getElementById('picturediv').style.left=parseInt(document.getElementById('picturediv').styl e.left)-step
clipright+=step
if (clipright>scrollerwidth) {
clipleft+=step
}
document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
var timer=setTimeout("scrollpicture()",pause)
}
else {
resetposition()
}
}
function resetposition() {
allpicturewidth=document.getElementById('emptypicturediv').offsetWidth
document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth
clipleft=0
clipright=0
document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
scrollpicture()
}
e utilizzo queste 3 funzioni in javascript per farle scorrere assieme al loro nome..
in ie7 funziona mentre in ff e crhome mi visualizza le immagini ma non le fa scorrere!!!!! che ***** c'è che nno va !!!!
function init() {
allpicturewidth=document.getElementById('emptypicturediv').offsetWidth
document.getElementById('picturediv').style.top=scrollertop
document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth
clipleft=0
clipright=0
cliptop=0
clipbottom=scrollerheight
document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.getElementById('picturediv').style.visibility="visible"
scrollpicture()
}
function scrollpicture() {
if (parseInt(document.getElementById('picturediv').style.left)>=scrollerleft-allpicturewidth) {
document.getElementById('picturediv').style.left=parseInt(document.getElementById('picturediv').styl e.left)-step
clipright+=step
if (clipright>scrollerwidth) {
clipleft+=step
}
document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
var timer=setTimeout("scrollpicture()",pause)
}
else {
resetposition()
}
}
function resetposition() {
allpicturewidth=document.getElementById('emptypicturediv').offsetWidth
document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth
clipleft=0
clipright=0
document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
scrollpicture()
}
Commenta