Create a Konamicode easteregg with jQuery

So here you are. You have just spend weeks on your brand new website and you feel quite satisfied with the result, but still there’s this feeling as if you missing something. Of course, some good ol’ easter-eggs!

I could go rambling about the use of easter-eggs, but since there isn’t any (exept for giving the millions of people that visit your site everyday a smile on their face), lets get to the point!

The konami code is a code used in may video games as a cheat code, first used in the game Gradius. This is the code:

Many websites now have this code implemented as an easter-egg. It is actually quite easy to create this, and with jQuery it becomes even simpler.

This is how to create a konamicode easter-egg that animates the backgroundcolor of the page to black with jquery:

Now this isn’t the best easter-egg ever written, but you can change the $('body').css() part to whatever you want. For example, if you use shadowbox, this is how you could make the easteregg rickroll your visitors: