I played a bit with your fiddle and came up with this: Fiddle
Instead of using the scrollTo plugin or jQuery's animate, I created a custom animation method that gets called with setInterval.
// This gets called from the setInterval and handles the animating
function animationLoop() {
var dx = targetX - posX, // Difference
vx = dx * EASING; // Velocity
// Add velocity to x position and update css with new position
posX += vx;
$paneContainer.css({left: posX});
}
The targetX gets updated in the mousemove handler
// Calculate the new x position for the scroll container
targetX = Math.round((event.pageX / windowWidth) * maxScroll);
[Edit]
To handle window resize you basically only have to reset the windowWidth and maxScroll variables:
$(window).on('resize', function() {
windowWidth = $(window).width();
maxScroll = -(containerWidth - windowWidth);
// OPTIONAL:
// Move scrollpane to original position on resize
targetX = 0;
// Start animating if it's not already
// Probably better in a new function: duplicate code from mousemove..
if (!animInterval) {
animInterval = setInterval(animationLoop, 1000 / FPS);
}
});