Hello,
Thanks for porting GSAP to JS! I used it for years in AS and was really excited to start using the JS version. I've already deployed it to several projects with great results.
I have run into my first road block, however, and I'm hoping someone may be able to assist. I've created a timeline animation that is controlled by a jQuery UI element (draggable). It works great in all browsers except, you guessed it, IE8. In IE8, the timeline will scrub forward with no problem, but will not scrub backwards in the timeline. I've confirmed that the value I am sending to progress() is properly decrementing, and I'm not sure what else I can do. My code is below:
tl = new TimelineLite(); // Create a TimelineLite instance
// Construct timeline from gallery items
$gallery.find('img.nfu-gallery-item').each(function(){
if(!$(this).hasClass('first-item')){ // Do not include first item, fade in not needed
tl.to($(this), 1, {opacity: 1, delay: 1}, '-=0.5');
}
});
tl.progress(0.5); // Move timeline to 50%
tl.pause(); // Pause timeline
// Update timeline position
var timelinePosition = function(handlePos){
percentLocation = (handlePos / sliderWidth);
tl.progress(percentLocation);
}
// Create jQuery UI draggable element for slider
$handle.draggable({axis: 'x', containment: $gallery.find('.nfu-gallery-slider'),
create: function(){
$handle.css('left',sliderWidth / 2); // Create UI element at middle of slider
},
drag: function(){
timelinePosition(parseInt($handle.css('left'))); // Update timeline position when UI element is dragged
}
});
Does anyone have any thoughts on why the timeline won't scrub backwards in IE8? Or, perhaps an alternative approach to take for IE8 that will achieve the same effect. Thanks in advance!