Permalink
Browse files

Merge pull request #129 from jamesjenner/master

Restore visibility attribute for slider element on completion of setup
  • Loading branch information...
2 parents 1527efd + 8fdc41a commit 5bfd384982c1c13a48108903a6ceaf5fee252223 @thebird committed Dec 14, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 swipe.js
View
5 swipe.js
@@ -73,6 +73,7 @@ Swipe.prototype = {
if (!this.width) return null;
// hide slider element but keep positioning during setup
+ var origVisibility = this.container.style.visibility;
this.container.style.visibility = 'hidden';
// dynamic css
@@ -88,8 +89,8 @@ Swipe.prototype = {
// set start position and force translate to remove initial flickering
this.slide(this.index, 0);
- // show slider element
- this.container.style.visibility = 'visible';
+ // restore the visibility of the slider element
+ this.container.style.visibility = origVisibility;
},

0 comments on commit 5bfd384

Please sign in to comment.