Skip to content

Jquery plugin to create easter eggs in your apps in a very simple way by Francisco Gonzalez

License

Notifications You must be signed in to change notification settings

gonpre/EasterEgg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasterEgg

Latest release License

Jquery plugin to create easter eggs in your apps in a very simple way by Francisco Gonzalez

Observation

This allow to set a word to type that will trigger the custom function. For this to work you need to include the Jquery library

<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>

Authors

Francisco Gonzalez, Jorge Rodriguez

Usage

In your javascript, just add the lines:

    var easter = $(window).eastereggs();
    easter.addEgg('magicword', function(){
        // Do something
    });
    easter.init();

You can add as many as you want, using a string or a array of charcodes:

    var easter = $(window).eastereggs();
    easter.addEgg('magicword', function(){
        // Do something
    });
    easter.addEgg([68,69,77,79], function(){
        // Do something 2
    });
    easter.init();

By default we added the KONAMI (up, up, down, down, left, right, left, right, b, a, b, a) code and it's very easy to use:

    var easter = $(window).eastereggs();
    easter.setKonami(function(){
        // Do something
    });
    easter.init();

Copyright and license

Copyright (C) 2015 Francisco Gonzalez

Licensed under the MIT license.

About

Jquery plugin to create easter eggs in your apps in a very simple way by Francisco Gonzalez

Resources

License

Stars

Watchers

Forks

Packages

No packages published