1
我使用此腳本滑塊:當圖像的數量超過9.引導傳送帶與縮略圖超過9項
縮略圖數10重定向到滑動0
數11滑動 http://www.bootply.com/79859 問題出現1
數12滑動2
...
什麼是錯的代碼?
$('#myCarousel').carousel({
interval: 4000
});
// handles the carousel thumbnails
$('[id^=carousel-selector-]').click(function(){
var id_selector = $(this).attr("id");
var id = id_selector.substr(id_selector.length -1);
id = parseInt(id);
$('#myCarousel').carousel(id);
$('[id^=carousel-selector-]').removeClass('selected');
$(this).addClass('selected');
});
// when the carousel slides, auto update
$('#myCarousel').on('slid', function (e) {
var id = $('.item.active').data('slide-number');
id = parseInt(id);
$('[id^=carousel-selector-]').removeClass('selected');
$('[id=carousel-selector-'+id+']').addClass('selected');
});
它的'可能不是這段代碼是錯誤的。給我們展示你的html怎麼樣? – 2014-10-01 09:12:26