Reputation: 5791
i have this plugin and it use different way to access, i spend two couples of hours trying to write a code to go to a specific item (index 5 for example), i have this code
var carouselNavigation = $('.carousel-navigation').jcarousel();
for
<div class="connected-carousels">
<div class="navigation">
<a href="#" class="prev prev-navigation">‹</a>
<a href="#" class="next next-navigation">›</a>
<div class="carousel carousel-navigation">
<ul>
{foreach $objects as $object}
<li><img src="{get_photo details=$object size='xl'}" width="50" height="50" alt=""></li>
{/foreach}
</ul>
</div>
</div>
</div>
now i want to go to index 5 directly by one function such as
carouselNavigation.goindex(5);
i'm tried
carouselNavigation.jcarousel().jcarouselControl({
target: carouselNavigation.jcarousel('items').eq(5)
});
and not worked, then tried
carouselNavigation.jcarouselControl({
target: carouselNavigation.jcarousel('items').eq(5)
});
not worked,then
jcarouselControl({
target: carouselNavigation.jcarousel('items').eq(5)
});
Upvotes: 0
Views: 39
Reputation: 482
As jcarousel is a method on a jquery element, It seems you could be done by something like :
$('.carousel-navigation').jcarousel('items').eq(5);
I hope it may help
Upvotes: 1