Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Dec 16, 2015 02:27 PM UTC:
>> Ideally, I would like something like this that still uses a graphic image when JavaScript is disabled.

> This is exactly what I did in my Chu Shogi description on this site, which is intended as the 'show case' for how this feature can be applied.

I just went there, turned off JavaScript, and didn't see the diagram anymore.

> Of course the article already did have a static image, so I just put that between {noscript} {/noscript} tags, so it would show up when JavaScript is turned off.

I searched the source of your Chu Shogi page for noscript, and it didn't turn up.

> But that would not make the text description of the diagram go away. When JavaScript is active it replaces the description text by the HTML table description of the diagram, but when it is not active, it obviously cannot do anything.

You could just put the parameters for the JavaScript code in the JavaScript as a series of variable assignments. Or you could encapsulate your code in a function and pass parameters in the function call.