fixed value works, dynamic not..but what's the difference?
Hi all
Got the following code:
-
jQuery(function() {
jQuery('#content').jcarousel({
scroll: 1,
start: 3,
size: 5,
initCallback: mainCarousel_initCallback
});
});
now i tried to change carousel based on the anchor. When calling the url with, e.g. #3 it should jump to position 3.
-
var getCarouselStart = function ()
{
offset = self.document.location.hash.substring(1);
if( offset == "" ) offset = 1;
return parseInt(offset);
}
jQuery(function() {
jQuery('#content').jcarousel({
scroll: 1,
start: getCarouselStart(),
size: 5,
initCallback: mainCarousel_initCallback
});
});
this won't work properly because it starts at the wrong place and the elements to navigate through are screwed up.
Does someone know why?