if i divide number of panels (kids.size()) by 2.75, i can get the indicator
to move from 1st to second position, but doesn't move beyond that...
// Clean up and abstract this code. @todo
function update_navigation(curr){
var kids = $(o.panel);
var kidsSize = (kids.size()/2.75);
var cloneVal = (o.circular) ? 2 : 0;
var pos = (kidsSize-cloneVal <= curr) ? (curr >
kidsSize-cloneVal) ? 2 :
kidsSize-cloneVal : curr;
pos = (pos == 0) ? kidsSize-cloneVal : pos;
var indicatorImages =
$(o.btnIndicator);
var sectionLinks = $("#sectionlinks a");
for(k = 0; k < indicatorImages.size(); k++){
if(pos == k+1){
$(indicatorImages[k]).attr("class", 'on');
} else {
$(indicatorImages[k]).attr("class", 'off');
}
}
for(k = 0; k < sectionLinks.size(); k++){
if(pos == k+1){
$(sectionLinks[k]).attr("class", 'selected');
} else {
$(sectionLinks[k]).attr("class", 'off');
}
}
};
--
View this message in context:
http://www.nabble.com/jcarousellite%3A-problem-finding-current-position-when-visibility-is-a-fraction-tp22218028s27240p22218085.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.