Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed "flash" on startup.

  • Loading branch information...
commit d12f94b1e175a59ff4c5b8b3b981884ad9259b85 1 parent e9bb232
@ryanstewart ryanstewart authored
View
4 src/www/css/style.css
@@ -55,3 +55,7 @@ body {
float: left;
}
+.viewhidden {
+ visibility: hidden;
+}
+
View
6 src/www/index.html
@@ -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
11 src/www/js/main.js
@@ -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) {
}
Please sign in to comment.
Something went wrong with that request. Please try again.