It looks like you’re new here. If you want to get involved, click one of these buttons!
Set the parameters of components in a data attribute is a great idea. Thank you for JKit!
Carousel is not working properly when limit is equal to or greater than the number of children. And transitions are not perfect in the reverse direction.
To fix these two bugs, I propose to hide the block outgoing, then move the block entering and show it. My changes are in line 2909 and the following:
if (!isAnimated) {
var pos = Math.min(options.limit, $el.children().length);
if (dir == ‘next’ || dir == undefined) {
plugin.triggerEvent('shownext', $el, options);
$el.children(':first-child').jKit_effect(false, options.animation, options.speed, options.easing, 0, function(){
$el.append($el.children(':nth-child(1)'));
$el.children(':nth-child('+pos+')').jKit_effect(true, options.animation, options.speed, options.easing, 0);
});
} else if (dir == ‘prev’) {
plugin.triggerEvent('showprev', $el, options);
$el.children(':nth-child('+pos+')').jKit_effect(false, options.animation, options.speed, options.easing, 0, function(){
$el.prepend( $el.children(':last-child') );
$el.children(':first-child').jKit_effect(true, options.animation, options.speed, options.easing, 0);
});
} }
Thx for the bug report, will look into it later today.
Thx again, especially for the code, it’s now in the latest version together with some other small fixes (v1.1.11).