I’m looking for an algorithm to make a ripple effect on a grid of squares so having a grid of squares how can I make it so when the user clicks on a square this produces a wave like animation of the surrounding squares? the following image illustrates the desired effect.

Here’s a working example in JavaScript.
http://jsfiddle.net/nsN57/17/
You can of course enhance it further, but your requirements were a bit vague.