X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=js%2Fgame.js;h=82ec54dd0f9cb57590a92698e62b233719034879;hp=3a1a0803257fa61bd5899f5687c6dd14441595a3;hb=904257a6571c948d6501a46ea449107a60b0a4e3;hpb=82dcaa7840d62d84174c91af4349262bfb4b18f9 diff --git a/js/game.js b/js/game.js index 3a1a080..82ec54d 100644 --- a/js/game.js +++ b/js/game.js @@ -5,9 +5,30 @@ var current=0; /* do the higlighting */ function hl(num) { var i; - for(i=0;i<14;i++){ $("#trick"+i).hide(); } + for(i=0;i<14;i++){ $("#trick"+i).hide(); $("#tricks"+i).removeClass('active'); } $("#trick"+num).css('display', 'block'); + $("#tricks"+num).addClass('active'); current=num; + + if(document.getElementById("tricks0")) + min=0; + else + min=1; + + if(document.getElementById("tricks13")) + max=13; + else + max=12; + + if(current==min) + $("#prevtr").addClass('disabled'); + else + $("#prevtr").removeClass('disabled'); + if(current==max) + $("#nexttr").addClass('disabled'); + else + $("#nexttr").removeClass('disabled'); + } /* highlight the last trick, useful when a page is called the first time*/ @@ -67,11 +88,6 @@ $(document).ready( $(".gameshidesession").hide(); }); - $("ul.loginregister").click(function () { - $(".dologin").slideToggle(); - $(".doregister").slideToggle(); - }); - $(".message div div").parent().click ( function() { $(this).hide(); }); });