I had a similar issue, that I solved in the following way. It's probably not very elegant (I don't have any formal training), but it works and I didn't have to worry about resetting parameters or anything.
First of all I assign the class 'selected' to the slide I'm scrolling to, in the onBefore option when I call serialScroll. ie
- onBefore: function( e, elem, $pane ){
- $('.slide').removeClass('selected');
- $(elem).addClass('selected');
- ...
- }
Then when I resize I call scrollTo independently and go to the slide that's currently selected.
- $(window).resize(function(){
- ...
- $('#slideshow').scrollTo('.selected');
- });
I don't know if that actually helps.