私は現在、jquery uiタブを使用するサイトに取り組んでおり、各タブでjcarouselを実装しています。最初のタブでは見た目も動作も問題ありませんが、2番目または3番目のタブに切り替えると、jcarouselはありません機能 これはなぜですか?ここに私のコードがあります、
`$("#related").tabs();`
`$('#complimentary-carousel, #similar-carousel, #viewed-carousel').jcarousel({
scroll : 5,
visible: 5
});`
HTML は次のようになります。
<div id="related" class="clearfix">
<ul class="tabs">
<li><a href="#complimentary">Complimentary</a></li>
<li><a href="#similar">Similar</a></li>
<li><a href="#viewed">Recently Viewed</a></li>
</ul>
<div id="complimentary">
<ul id="complimentary-carousel" class="carousel">
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
</ul>
</div>
<div id="similar">
<ul id="similar-carousel" class="carousel">
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
</ul>
</div>
<div id="viewed">
<ul id="viewed-carousel" class="carousel">
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€50</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
<li>
<a href="">
<img src="assets/img/products/mini-radio.png"/>
<span class="price">€30</span>
</a>
</li>
</ul>
</div>
</div>