From 736770ce8940df5c1a8d82240c3bbcf0cf0755f5 Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 10 Jan 2014 11:07:01 -0800 Subject: [PATCH 1/2] changed center, left & right classes --- css/pageslider.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/css/pageslider.css b/css/pageslider.css index a30de32..fd10c14 100644 --- a/css/pageslider.css +++ b/css/pageslider.css @@ -15,17 +15,17 @@ transform: translate3d(0, 0, 0); } -.page.left { +.page.pos_left { -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } -.page.center { +.page.pos_center { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -.page.right { +.page.pos_right { -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); } @@ -33,4 +33,4 @@ .page.transition { -webkit-transition-duration: .25s; transition-duration: .25s; -} \ No newline at end of file +} From 570ec1c5bf1afe4fb8ecf62a63a8f31732f44aca Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 10 Jan 2014 11:07:52 -0800 Subject: [PATCH 2/2] changed center, left & right classes like css --- pageslider.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pageslider.js b/pageslider.js index 9830cc0..309789f 100644 --- a/pageslider.js +++ b/pageslider.js @@ -22,10 +22,10 @@ function PageSlider(container) { } if (state === stateHistory[l-2]) { stateHistory.pop(); - this.slidePageFrom(page, 'left'); + this.slidePageFrom(page, 'pos_left'); } else { stateHistory.push(state); - this.slidePageFrom(page, 'right'); + this.slidePageFrom(page, 'pos_right'); } } @@ -36,7 +36,7 @@ function PageSlider(container) { container.append(page); if (!currentPage || !from) { - page.attr("class", "page center"); + page.attr("class", "page pos_center"); currentPage = page; return; } @@ -52,9 +52,9 @@ function PageSlider(container) { container[0].offsetWidth; // Position the new page and the current page at the ending position of their animation with a transition class indicating the duration of the animation - page.attr("class", "page transition center"); - currentPage.attr("class", "page transition " + (from === "left" ? "right" : "left")); + page.attr("class", "page transition pos_center"); + currentPage.attr("class", "page transition " + (from === "pos_left" ? "pos_right" : "pos_left")); currentPage = page; } -} \ No newline at end of file +}