... | ... |
@@ -1,3 +1,7 @@ |
1 |
+<div class="row2"> |
|
2 |
+ <div class="column" onclick="onPageMinus()" id="pageMinus"><div class="arrow-left"></div></div> |
|
3 |
+ <div class="column" onclick="onPagePlus()" id="pagePlus"><div class="arrow-right"></div></div> |
|
4 |
+</div> |
|
1 | 5 |
<script> |
2 | 6 |
function init() { |
3 | 7 |
var imgDefer = document.getElementsByTagName("img"); |
... | ... |
@@ -27,10 +31,20 @@ |
27 | 31 |
document.getElementById("mangaOpacityValue").innerHTML = curOpacity; |
28 | 32 |
changeOpacity(); |
29 | 33 |
} |
34 |
+ function onPagePlus() { |
|
35 |
+ var currPage = parseInt(document.getElementById("mangaCurrPage").innerHTML)-1; |
|
36 |
+ console.log("onPagePlus: ["+currPage+"]"); |
|
37 |
+ onArticle(currPage+1); |
|
38 |
+ } |
|
39 |
+ function onPageMinus() { |
|
40 |
+ var currPage = parseInt(document.getElementById("mangaCurrPage").innerHTML)-1; |
|
41 |
+ console.log("onPageMinus: ["+currPage+"]"); |
|
42 |
+ onArticle(currPage-1); |
|
43 |
+ } |
|
30 | 44 |
function onArticle(index) { |
31 | 45 |
if(index < 0) index = 0; |
32 | 46 |
var string_index = "article-"+index; |
33 |
- //console.log("onArticle("+index+") : "+string_index); |
|
47 |
+ console.log("onArticle("+index+") : "+string_index); |
|
34 | 48 |
var url = location.href; |
35 | 49 |
var x = document.getElementById("item-active"); |
36 | 50 |
x.className = string_index; |
... | ... |
@@ -150,3 +150,30 @@ a:hover{} |
150 | 150 |
border-bottom: 12px solid transparent; |
151 | 151 |
border-right:12px solid #cc9630; |
152 | 152 |
} |
153 |
+ |
|
154 |
+.row2 { |
|
155 |
+ display:none; |
|
156 |
+} |
|
157 |
+#pageMinus { |
|
158 |
+ margin-left: 1%; |
|
159 |
+ width:48%; |
|
160 |
+ background-color:#222; |
|
161 |
+} |
|
162 |
+#pagePlus { |
|
163 |
+ text-align: right; |
|
164 |
+ margin-right: 1%; |
|
165 |
+ width:48%; |
|
166 |
+ background-color:#222; |
|
167 |
+} |
|
168 |
+.row2:after { |
|
169 |
+ content: ""; |
|
170 |
+ display: table; |
|
171 |
+ clear: both; |
|
172 |
+} |
|
173 |
+ |
|
174 |
+ |
|
175 |
+@media screen and (max-width: 768px) { |
|
176 |
+ /*#colLeft { display: none; } |
|
177 |
+ #colRight { display: none; }*/ |
|
178 |
+ .row2 { display: block; } |
|
179 |
+} |