RE: [jQuery] Re: Konami Code >:]

2009-11-18 Thread Rick Faircloth
Thanks! -Original Message- From: MorningZ [mailto:morni...@gmail.com] Sent: Wednesday, November 18, 2009 6:05 PM To: jQuery (English) Subject: [jQuery] Re: Konami Code >:] "Got an example site? " www.facebook.com http://www.google.com/search?q=facebook+konami+code On No

[jQuery] Re: Konami Code >:]

2009-11-18 Thread MorningZ
"Got an example site? " www.facebook.com http://www.google.com/search?q=facebook+konami+code On Nov 18, 5:56 pm, "Rick Faircloth" wrote: > What is this? > > Something unexpected happens when someone presses designated keys? > Easter Eggs? > > Got an example site? > > Rick > > -Original Mes

[jQuery] Re: Konami Code >:]

2009-11-17 Thread ThePengwin
I posted this before, but i think i replied to the wrong thing, whoops! anyway, How about making it a jquery plugin? :) [code] $.konamiCode = function (toExecute){ var press = 0, keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13]; $(document).keydown(function (e){ if (e.which

[jQuery] Re: Konami Code >:]

2009-11-17 Thread Greg Tarnoff
Love it, although I had to make some modifications to get it to work. Your function without the {} brackets didn't run, also add in the key '13' as this is the enter key (aka start). [code] $(function (){ var press = 0, keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13]; $(document).keydown(