2017-06-20 46 views
1

我試圖使用帶有引導標籤光滑JS滑塊像下面與引導標籤油滑JS

enter image description here

在第一個選項卡(熱賣),滑塊效果很好。但是,當我切換到另一個選項卡(如「TEXT-BOOKS」)時,即使與第一個選項卡(BEST SELL)的代碼相同,也會顯示完全錯誤。

enter image description here

但是當我點擊下一個箭頭就固定成原來的標籤我想要的東西,如第一張照片。

 $(document).on('ready', function() { 

     $(".tab2").slick({ 
     setPosition : 0, 
     dots: true, 
     infinite: true, 
     slidesToShow: 5, 
     slidesToScroll: 3 
     }); 

     $(".regular").slick({ 
     dots: true, 
     infinite: true, 
     slidesToShow: 5, 
     slidesToScroll: 3 
     }); 
}); 

HTML:

<div id="menu2" class="tab-pane fade "> 
    <div class="tab2 slider "> 


    <div class="contentbox"> 
<img src="images/bk2.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk3.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk1.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk1.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk1.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk1.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk1.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    <div class="contentbox"> 
<img src="images/bk1.png" class="contentbox_img"> 
<a href="" class="contentbox_title">The Third Planet</a> 
<p class="contentbox_price">$200.00</p> 
    </div> 

    </div> 

+0

我們可以有你的設計的網址,否則ü可以更新您的代碼片斷? –

+0

https://github.com/YanMyoAung/libraryUI.git –

回答

1

試試這個:

JS:

​​