0
私はこのチュートリアルからこのスクリプトを抜きました。複数のスライドと選択可能な「現在の」ステップに沿ったステップjQueryカルーセルのスクロール
しかし、ステップにスライド量が足りない場合は、ステップがまったく実行されません。誰もがこれを修正して
<script language="javascript">
jQuery(function() {
var step = 8;
var current = 10;
var maximum = jQuery('#thumb-nav-inner ul li').size();
var visible = 8;
var speed = 500;
var liSize = 114;
var carousel_height = 93;
var ulSize = liSize * maximum;
var divSize = liSize * visible;
jQuery('#thumb-nav-inner ul').css("width", ulSize+"px").css("left", -(current * liSize)).css("position", "absolute");
jQuery('#thumb-nav-inner').css("width", divSize+"px").css("height", carousel_height+"px").css("visibility", "visible").css("overflow", "hidden").css("position", "relative");
jQuery('#right-thumb-scroll').click(function() {
if(current + step < 0 || current + step > maximum - visible) {return; }
else {
current = current + step;
jQuery('#thumb-nav-inner ul').animate({left: -(liSize * current)}, speed, null);
}
return false;
});
jQuery('#left-thumb-scroll').click(function() {
if(current - step < 0 || current - step > maximum - visible) {return; }
else {
current = current - step;
jQuery('#thumb-nav-inner ul').animate({left: -(liSize * current)}, speed, null);
}
return false;
});
});
を助けることができますか?
ありがとうございました!
はい、これは意味があり、私が探しているところですが、これらのjquery計算を行う方法がわかりません - 手助けできますか?乾杯! – Infocentre