我有一個列表。當用戶執行某些操作時,我想要替換所有列表內容,但將其呈現爲新列表數據從右向左滑動,並將舊列表數據推送到左側。例如:使用幻燈片動畫顯示/隱藏列表?
<ul id='content'>
<li>red</li>
<li>green</li>
</ul>
現在,當用戶按下例如按鈕,我將有新的列表內容:
<ul id='content'>
<!--
replace list item content now.
the old red,green items should slide off to the left.
the new yellow,purple items should slide in from the right
-->
<li>yellow</li>
<li>purple</li>
</ul>
我不知道我怎麼會從所有的老li元素滑出從左到右,jQuery的UI的隱藏+滑動效果似乎是我想要什麼,但:
http://jqueryui.com/demos/hide/
如果我能結合起來,與節目+幻燈片效果,我想我可以GE它工作。我想知道,如果這是一個很好的解決方案,或者有更簡單的方法去?我最關注的是滑動式和滑蓋式的動畫將不得不以其他方式同步上漲,它會看起來很糟糕,
感謝
再次感謝尼克。這讓我走上了正軌,我認爲我想創造的是旋轉木馬。這個項目很苗條,可以作爲一個很好的起點:http://code.google.com/p/jquery-infinite-carousel/ – user246114 2010-09-03 19:19:21