Konami Code example

Developer
Size
2,322 Kb
Views
18,216

How do I make an konami code example?

Based on what I found at http://www.gethifi.com/blog/konami-code-jquery-plugin-pointlessly-easy, I took the tips of the comments, ran it through JSLint to help clean it up a little, and then through in a hidden div to show off the use of the code instead of triggering an alert.. What is a konami code example? How do you make a konami code example? This script and codes were developed by JR Jenkins on 04 October 2022, Tuesday.

Konami Code example Previews

Konami Code example - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Konami Code example</title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html> <head><title>Nothing to see here</title></head> <body> <h1>Move along sir...</h1> <p>There is probably nothing to see here.</p> <div id="thegoodstuff"> <p>Oh, you know Konami? I guess your cool then. Enjoy a random picture from <a href="http://www.lorempixel.com">www.lorempixel.com</a></p> <img src="//lorempixel.com/400/400/" class="img-responsive" /> </div> </body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Konami Code example - Script Codes CSS Codes

#thegoodstuff { display: none; }
.img-responsive { display: inline-block; height: auto; max-width: 100%;
}

Konami Code example - Script Codes JS Codes

(function ($) { "use strict"; $.fn.konami = function (callback, code) { if (code === undefined) { code = "38,38,40,40,37,39,37,39,66,65"; } return this.each(function () { var kkeys = []; $(this).keydown(function (e) { kkeys.push(e.keyCode); while (kkeys.length > code.split(',').length) { kkeys.shift(); } if (kkeys.toString().indexOf(code) >= 0) { kkeys = []; callback(e); } }); }); };
}(jQuery));
$(window).konami(function () { "use strict"; $("#thegoodstuff").slideToggle("slow");
});
Konami Code example - Script Codes
Konami Code example - Script Codes
Home Page Home
Developer JR Jenkins
Username jrjenk
Uploaded October 04, 2022
Rating 3
Size 2,322 Kb
Views 18,216
Do you need developer help for Konami Code example?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

JR Jenkins (jrjenk) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!