silverorange labs

Comments

Steven Perry -

OOhhh, that's really neat :) Feels just like doing a regular word search, only you don't need a pencil.

Hadley -

I've just had a very quick look at your javascript, but I think I can see a couple of ways to make it simpler.

Instead of passing the block id to switchBox(), you could pass this. eg javascript:switchBox(this). Then you don't need to put an id on each block, and you can work directly with the element in JS. eg.

function switchBox(box) {
box.className = box.className == "on" ? "off" : "on"}

(My javascript's a bit rusty, so I'm not sure how compatible this is)

You could also style .wordsearch td instead of .wordsearchoff, which would mean you wouldn't need to put a class in the html.

Hadley

Post a Comment: Nifty Word Search Game

Email addresses are not displayed with your comment and will not be shared.
Allowed tags are: <em>, <strong>, <code> and <a href="url">. All other tags will be displayed as plain text.