X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariant.js;h=2174c50918498f1cfe0e73daa7b4c65dfed03cab;hb=4ecf423bce243e8e10b5b777a95f67ecc9f8d8d3;hp=f9d23d8bf67a175c2d4ef706527b7d4262c33b82;hpb=f5d3e4f539355d166baf38bab97480582e90e4af;p=vchess.git diff --git a/public/javascripts/variant.js b/public/javascripts/variant.js index f9d23d8b..2174c509 100644 --- a/public/javascripts/variant.js +++ b/public/javascripts/variant.js @@ -4,4 +4,12 @@ new Vue({ // TODO: listen event "show problem", avec le probleme stringifié en arg // Alors: display=game, mode=friend, newGame(fen, turn, ...), // et set Instructions+Soluce + methods: { + toggleDisplay: function(elt) { + if (this.display == elt) + this.display = ""; //hide + else + this.display = elt; //show + }, + }, });