
17-12-2009, 18:02
|
|
|
|
חבר מתאריך: 15.02.09
הודעות: 292
|
|
|
בסוף כתבתי לבד קוד js
מי שרוצה חופשי
שתי פונקציות :
move_left()-להזיז שמאלה -
move_right()-להזיז ימינה
קוד PHP:
css -------- .div id name{ white-space:nowrap; position:relative;top:480px;left:330px;*left:720px ; width:264px; height:166px; overflow: hidden; background-color:#fff; margin:100px auto 0 auto;
}
/////////////////this MOVE PIC BUTTONS var start_do = "" ; var active = "no" ;
function startleft(){ var value = document.getElementById('div id name').scrollLeft ; if(value < 632){ document.getElementById('div id name').scrollLeft = value + 12 ; } } function move_left(){ if(active = "no") { start_do = setInterval( 'startleft()' ,100) ; } }
function startright(){ var value = document.getElementById('div id name').scrollLeft ; if(value > 0){ document.getElementById('div id name').scrollLeft = value - 12 ; } }
function move_right(){ if(active = "no") { start_do = setInterval('startright()' ,100) ; } }
function stop_now(){ clearInterval(start_do) ; start_do = "" ; active = "no" ; }
|