0
window.addEvent( 'domready中',函數(){ VAR totIncrement = 0的卷軸; 變種增量= 560; 變種maxRightIncrement =增量*( - 6); VAR FX =新Fx.Style( '滑塊列表', '保證金左',{ 持續時間:1000, 過渡:Fx.Transitions.Back.easeInOut, 等待:真 }); // - ----------------------------------- // EVENT for the button「previous」 $('previous ').addEvents({'click':function(event){ if(totIncrementmaxRightIncrement){totlcrement = totIncrement-increment; fx.stop() fx.start(totIncrement); } } }) }); 在mootools的V1.1
它使一個滾動條功能,在我的HTML頁面的底部。 但是當我點擊下一個按鈕頁面的焦點移動到頁面的頂部。我如何將它保存在滾動條上?
這是HTML片段:
<h3>Our Pastas</h3>
<div id="slider-buttons">
<a href="#" id="previous">Previous</a> | <a href="#" id="next">Next</a>
</div>
<div id="slider-stage">
<ul id="slider-list">
<li class="list_item">
<div id="thumbnail"><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini"><img src="xxx/images/stories/products/_thumb1/bucatini.gif"></a></div><h4><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini">Rustichella d'Abruzzo Bucatini</a></h4>
</li>
<li class="list_item">
<div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata"><img src="xxx/images/stories/products/_thumb1/calamarata.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata">Rustichella d'Abruzzo Calamarata</a></h4>
</li>
<li class="list_item">
<div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi"><img src="xxx/images/stories/products/_thumb1/cannolicchi.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi">Rustichella d'Abruzzo Cannolicchi</a></h4>
</li>
</ul></div>