Permalink
Browse files

remove small gap when move slide after goToSelectedPage

  • Loading branch information...
1 parent eff612d commit 6db797304f1f5e69ad6f61d6ccef32d72fcc4254 @remylab committed Jul 21, 2011
Showing with 18 additions and 21 deletions.
  1. +9 −9 jPaginator-min.js
  2. +9 −12 jPaginator.js
View
Oops, something went wrong.
View
@@ -198,23 +198,16 @@
}
function onEnterButton(that,e) {
- var controls = that.data('jPaginator').controls;
var dir = 'left';
if ( e.hasClass("right") ) { dir = 'right'; }
- controls.isMoving = true ;
- controls.listenSlider = false;
- // update data
- that.data('jPaginator').controls = controls ;
+ that.data('jPaginator').controls.isMoving = true ;
move(that,dir);
}
function onLeaveButton(that,e) {
- var controls = that.data('jPaginator').controls;
- controls.listenSlider = true;
- that.data('jPaginator').controls = controls ;
reset(that);
}
@@ -240,12 +233,16 @@
var controls = that.data('jPaginator').controls;
var newNum = settings.selectedPage- Math.floor((settings.length-1)/2);
+
updateNum(that, newNum );
+
+ controls.listenSlider = false;
+ controls.infRel = 0;
+ that.data('jPaginator').controls = controls
- moveSliderTo(that, controls.cInf);
-
- controls.listenSlider = true;
- that.data('jPaginator', {settings : settings,controls : controls});
+ moveSliderTo(that, controls.cInf);
+
+ that.data('jPaginator').controls.listenSlider = true;
if (typeof(jPaginatorPageClicked) == "function") {
jPaginatorPageClicked(that.attr("id"),settings.selectedPage);

0 comments on commit 6db7973

Please sign in to comment.