想象一下這樣的代碼(簡化)jQuery的移動和加速到未知的距離(平滑滾動)
<img id="leftArrow"/>
<div style="overflow:hidden; width:300px">
<img id="wideImage" style="width:1000px; position:absolute; left:0"/>
</div>
<img id="rightArrow"/>
,這將導致這樣的事情
alt text http://home.exetel.com.au/aximili/tmp/stackoverflow-sample-scroll.jpg
你怎麼一個方向使#wideImage在#rightArrow懸停時向左滾動?
我事先像這樣
$('#right').hover(function() {
//On hover, accelerate #wideImage to the left
}, function() {
//On mouse out, decelerate to stop
});
謝謝了!
謝謝,我不是在尋找循環,但它的有趣,給了我一個想法,+1 – Aximili 2010-07-03 12:28:37