kos
kos

Reputation: 269

Smooth sliding animation and transition in JavaScript/jQuery

Im trying to animate or ease the incremental scroll left triggered as shown in the below fiddle, but struggling to find the issue with the smooth transition. Any help would be really appreciated, thank you

function scrollRight() {
i = (i + 1) % elements.length;

jQuery(slider).parent().animate({
  scrollLeft: (width) + 'px'
}, options.hasOwnProperty('speed') ? options.speed : 1000, function() {
  obj.find('li:first-child').appendTo(jQuery(slider).parent().scrollLeft(0).find(slider));

  if (!pause)
    timeout = setTimeout(scrollRight, options.hasOwnProperty('interval') ? options.interval : 2000);
});

}

http://jsfiddle.net/rshr0Lv5/

Upvotes: 0

Views: 81

Answers (1)

Azad
Azad

Reputation: 5264

remove max-width: 340px; in css

Upvotes: 1

Related Questions