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
"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
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
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(
4 matches
Mail list logo