I am currenty using Jcarousel with a light box plugin. I have some thumbnails and when each one is clicked a light box pops up with the larger version of thumbnail in it, also i have in that light box the ability to click left or right to rotate throught the other thumbnails(this is all generated using the Jcarousel) My issue is i would like the carousel to start the corresponding thumb nail that was clicked to open the light box:
HTML:
<div id="productAlts">
<div class="altWrap">
<a id="close_x" class="close" href="#" title="close quick view" ></a>
<ul>
<% int altImageCount = 0;
foreach (var img in addtImages)
{
altImageCount++;
}
%>
<% int i = 0;
foreach (var img in addtImages)
{
i++;
if (i != altImageCount)
{%>
<li class="<%=img %>">
<img src="http://www.someurl.com/images/products/<%=img.Replace(".jpg", "") %>l.jpg" alt="<%= Model.Name %>" title="<%= Model.Name %>" width="500" height="500" />
</li>
<% }
} %>
</ul>
</div>
jquery:
function QuickAlternate() {
$('.alternateImages ul li').click(f开发者_开发问答unction (e) {
$('#productAlts').lightbox_me({
centered: true,
onLoad: function () {
$('#productAlts ul').jcarousel({
wrap: 'circular', scroll: 1, visible: 1
});
}
});
e.preventDefault();
});
}
If anyone can help it would be very appreciated since i have been banging my head against this for a while
Not entirely sure I understand what you're looking for, but it sounds like the start
option as shown in http://sorgalla.com/projects/jcarousel/#Configuration should do what you want? So something like this:
$('#productAlts ul').jcarousel({
wrap: 'circular', scroll: 1, visible: 1, start: 4
});
would start on the 4th one?
精彩评论