Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jszersze committed Aug 8, 2013
1 parent cf3a4fc commit 48a704a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 6 additions & 2 deletions css/sample.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
html, body { width:100%; height:100%; margin:0; overflow:hidden; }

.container { width:100%; height:100%; position:relative; overflow:hidden; }

.box { -moz-transition: all .3s ease-out; -webkit-transition: all .3s ease-out; -o-transition: all .3s ease-out; }
.box { position:absolute; top:50px; left:0; background:#333; color:#fff; -webkit-transform:translate3d(1024px, 0px, 0px); opacity:0; }
.box { position:absolute; top:0; left:0; right:0; /*background:#333;*/ color:#fff; -webkit-transform:translate3d(1024px, 0px, 0px); opacity:0; }

.box img { display:block; }
.box img { width:auto; height:100%; margin:auto; display:block; }

a { padding:10px; cursor:pointer; }
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<div id="box"></div>
<div class="container" id="box"></div>

<script type="text/template" id="page">
<div class="box" id="{{id}}"><img src="{{url}}" draggable="false"></div>
Expand Down
7 changes: 2 additions & 5 deletions js/dm-book.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
if(this._pages != null){
$(this._pages[0]).css({
'-webkit-transform': 'translate3d(0px, 0px, 0px)',
'z-index': '1'
'z-index': '1',
'opacity': 1
});
}
},
moveBook: function(direction){
if(direction == 'left'){
console.log('left');
if(this._pointer > 0){
this._pointer--;

Expand All @@ -81,10 +81,8 @@
'z-index': 1,
'opacity': 1
});
console.log(objectP, objectM, this._pointer);
}
} else if(direction == 'right' && this._pages.length > 1){
console.log('right');
if(this._pointer < (this._pages.length - 1)){
this._pointer++;

Expand All @@ -101,7 +99,6 @@
'z-index': 1,
'opacity': 1
});
console.log(objectP, objectM, this._pointer);
}
}
}
Expand Down

0 comments on commit 48a704a

Please sign in to comment.