Permalink
Browse files

Fixed "flash" on startup.

  • Loading branch information...
1 parent e9bb232 commit d12f94b1e175a59ff4c5b8b3b981884ad9259b85 @ryanstewart ryanstewart committed Apr 18, 2012
Showing with 9 additions and 12 deletions.
  1. +4 −0 src/www/css/style.css
  2. +3 −3 src/www/index.html
  3. +2 −9 src/www/js/main.js
View
@@ -55,3 +55,7 @@ body {
float: left;
}
+.viewhidden {
+ visibility: hidden;
+}
+
View
@@ -35,7 +35,7 @@
<div id="viewport" class="height_inherit">
<div id="slidecontainer" class="height_inherit">
<!-- View 1 -->
- <div id="view1" class="viewcontainer height_inherit">
+ <div id="view1" class="viewcontainer height_inherit viewhidden">
<div class="list" id="set_list" >
<ul>
<li>Item 1</li>
@@ -53,10 +53,10 @@
<!-- End View 1 -->
<!-- View 2 -->
- <div id="view2" class="viewcontainer height_inherit">View 2</div>
+ <div id="view2" class="viewcontainer height_inherit viewhidden">View 2</div>
<!-- End View 2 -->
<!-- View 3 -->
- <div id="view3" class="viewcontainer height_inherit">View 3</div>
+ <div id="view3" class="viewcontainer height_inherit viewhidden">View 3</div>
<!-- End View 3 -->
</div>
</div>
View
@@ -10,9 +10,9 @@ $(document).ready(function() {
slideViewport($(event.target).data().view);
});
+ $(".viewcontainer").removeClass("viewhidden");
+
viewportWidth = $("#viewport").width();
-
- $("#viewport").click(onViewPortClick);
var numberOfViews = $("#slidecontainer").children().length;
$("#slidecontainer").width(numberOfViews * viewportWidth);
@@ -29,13 +29,6 @@ function slideViewport(index) {
}
-function onViewPortClick(event) {
-
- var currentLeftValue = parseInt($("#slidecontainer").css("left"));
-
- $("#slidecontainer").css("left", currentLeftValue-viewportWidth);
-}
-
function onSelectView(event) {
}

0 comments on commit d12f94b

Please sign in to comment.