您可以通過使用兩個下列選項中作弊:
使用CSS,你應該重寫設置一些下面類:
<style>
jcarousel-prev-disabled,
jcarousel-next-disabled,
jcarousel-prev-disabled-horizontal,
jcarousel-next-disabled-horizontal{
background-position:0 0;
}
</style>
使用Javascript,該解決方案與第一個相同。我們應該刪除類:disable
爲next
和previous
按鈕:
<script>
jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
itemFirstOutCallback: {
onBeforeAnimation: function(){
},
onAfterAnimation: function(){
$(".jcarousel-prev").removeClass("jcarousel-prev-disabled");
$(".jcarousel-prev").removeClass("jcarousel-prev-disabled-horizontal");
}
},
itemLastOutCallback: {
onBeforeAnimation: function(){
},
onAfterAnimation: function(){
$(".jcarousel-next").removeClass("jcarousel-next-disabled");
$(".jcarousel-next").removeClass("jcarousel-next-disabled-horizontal");
}
}
});
});
</script>
P/S:我只是試着去閱讀它的文檔,並使用Firebug
(飛〜編輯)來檢測。如果可以的話,你可以試試。好有趣。
不知道這是爲什麼不選擇的答案 - 它更全面! – scubbo