Konami jQuery Plugin

Back when I worked at Tatango, Adrian wrote a very concise implementation for the konami code.

So, I figured I would make a nice little jQuery plugin. This is how you would use it:

The end result is nice, small, and efficient. Internally it triggers the “konami” event, so it’s easy to trigger multiple functions after the konami code has been fired. Here is the entire plugin, uncompressed. You can also find the whole project, including a Readme and compressed version here: http://github.com/amiel/konami

This wasn’t good enough for Adrian though. No, he wanted to be able to register multiple functions and that one of them would get triggered at random on the “konami” event. So, for extra credit, here is the random konami addition:

Comments
blog comments powered by Disqus