Я использую JCarouselLite , чтобы создать три поля прокрутки на веб-сайте. 2 из каруселей расположены правильно (New
, Gifts)
, а третье - нет (BestSellers
).
Изображение плавает влево, потому что плагин продолжает неправильно вычислять ширину. Все три имеют один и тот же базовый HTML-код, но я не могу заставить BestSeller
Карусель правильно выстроиться.
Я также пытался запустить его на window.load
. и init
работает в нижнем колонтитуле.
Что мне не хватает?
Обновление
Вот код, который инициализирует карусель:
jQuery(document).ready(function($){
$(".rotateNewContent").jCarouselLite({
btnNext: ".next", btnPrev: ".prev",
speed: 800, visible: 1
});
$(".rotateBestsellerContent").jCarouselLite({
btnNext: ".nextBest", btnPrev:
".prevBest", speed: 800, visible: 1
});
$(".rotateGiftContent").jCarouselLite({
btnNext: ".nextGift", btnPrev:
".prevGift", speed: 800, visible: 1
});
});
вот HTML первого и второго списков.
<button class="prev"></button>
<div class="rotateWrapper"><div class="rotateNewContent">
<ul class="NewProductList">
<li class="Odd">
<div class="ProductImage">
<a href="#" ><img src="#" alt="" /></a>
</div>
<div class="ProductDetails">
<strong>
<a href="#">Organic Maple Syrup from Mount Cabot</a>
</strong>
</div>
<div class="ProductPriceRating">
<em>$13.00</em>
</div>
</li>
<li class="Even">
<div class="ProductImage">
<a href="#" ><img src="#" alt="" /></a>
</div>
<div class="ProductDetails">
<strong>
<a href="#">Sicilian Marmalades from Marchesi di San
Giuliano</a>
</strong>
</div>
<div class="ProductPriceRating">
<em>$15.00</em>
</div>
</li>
</ul>
</div></div><button class="next"></button>
<button class="prevBest"></button>
<div class="rotateWrapper"><div class="rotateBestsellerContent">
<ul class="NewProductList">
<li>
<div class="ProductImage"><a href="#" alt="" /></a>
</div>
<div class="ProductDetails">
<strong><a href="#">Farro from Rustichella d'Abruzzo</a></strong>
<em>$8.75</em>
</div>
</li>
<li>
<div class="ProductImage">
<a href="#" alt="" /></a>
</div>
<div class="ProductDetails">
<strong><a href="#">Mariage Frères Marco Polo</a></strong>
<em>$22.00</em>
</div>
</li>
</ul>
NB : Этот сайт еще не запущен, пожалуйста, не делайте покупки.