diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/game.php | 4 | ||||
-rw-r--r-- | include/output.php | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/game.php b/include/game.php index 55ce7a6..3bbfccd 100644 --- a/include/game.php +++ b/include/game.php @@ -1735,8 +1735,8 @@ switch($mystatus) echo " </div>\n </li>\n"; /* end div trick, end li trick */ } - - echo "</ul>\n"; /* end ul tricks*/ + echo " <li onclick=\"hl_prev();\" class=\"old\"><a href=\"#\">prev</a></li>\n"; + echo " <li onclick=\"hl_next();\" class=\"old\"><a href=\"#\">next</a></li>\n</ul>\n"; /* end ul tricks*/ echo "<div class=\"notes\"> Personal notes: <br />\n"; $notes = DB_get_notes_by_userid_and_gameid($myid,$gameid); diff --git a/include/output.php b/include/output.php index 62ab264..28489a0 100644 --- a/include/output.php +++ b/include/output.php @@ -230,6 +230,7 @@ function output_header() <link rel="shortcut icon" type="image/x-icon" href="pics/edoko-favicon.png" /> <link rel="stylesheet" type="text/css" href="css/standard003.css" /> <script type="text/javascript"> + var current=0; function hl(num) { if(document.getElementById){ var i; @@ -238,6 +239,7 @@ function output_header() document.getElementById("trick"+i).style.display = 'none'; } document.getElementById("trick"+num).style.display = 'block'; + current=num; } } function high_last(){ @@ -247,11 +249,22 @@ function output_header() if(document.getElementById("trick"+i)) { hl(i); + current=i; break; } } } } + function hl_next() + { + if(document.getElementById("trick"+(current+1))) + hl(current+1); + } + function hl_prev() + { + if(document.getElementById("trick"+(current-1))) + hl(current-1); + } </script> </head> <body onload="high_last();"> |