Just a few lines of code and we have a MIDI-keyboardish thingie full of colored square keys to click: Yes, they are clickable!
Pretty much done already, could employ a couple of swell modern features though. What kind of a midi-keyboard cannot do anything on it's own? Playing sequences after just one touch is a must-have feature, time to code it! Pressing one key will start off a bunch of pitches, as if we pressed some of them sequentially. When launching an animation on a key, we need to know which one goes next. We'll link elements using their data field. Have a look at jQuery .data, nice one. Now that for each element we know who's next, we can enhance the animation function by adding a callback. Callback practice is over, enjoy the result of all this hard work :)Source code links: