Originariamente inviato da lyllo
grazie, ma non vorrei usare le scroll bar di default ed in piu magari vorrei pensare di implementare uno js per fare uno scorrimento graduale e non a scatto..
per fare quello che vuoi devi impostarla cosi, poi tramie jscript la togli
codice:
<script type="text/javascript">
scrollStep=2
timerLeft=""
timerRight=""
function toLeft(id){
document.getElementById(id).scrollLeft=0
}
function scrollDivRight(id){
clearTimeout(timerRight)
var el=document.getElementById(id);
var soFar=el.scrollLeft;
el.scrollLeft=(soFar+el.offsetWidth+scrollStep > el.scrollWidth)?0:soFar+scrollStep;
timerRight=setTimeout("scrollDivRight('"+id+"')",10)
}
function scrollDivLeft(id){
clearTimeout(timerLeft)
var el=document.getElementById(id);
var soFar=el.scrollLeft;
el.scrollLeft=(soFar-scrollStep <0)?el.scrollWidth:soFar-scrollStep;
timerLeft=setTimeout("scrollDivLeft('"+id+"')",10)
}
function toBottom(id){
document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}
function stopMe(){
clearTimeout(timerRight)
clearTimeout(timerLeft)
}
</script>