Skip to content

Instantly share code, notes, and snippets.

@IvanLysenko
Created June 18, 2013 17:09
Show Gist options
  • Save IvanLysenko/5807317 to your computer and use it in GitHub Desktop.
Save IvanLysenko/5807317 to your computer and use it in GitHub Desktop.
early prototype of a keyboard display. still figuring out how to manage buttons.
<!DOCTYPE html>
<html>
<head>
<title>Keybord</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script src="http://code.jquery.com/jquery-2.0.2.min.js"></script>
<script src="script.js" type="text/javascript"></script>
</head>
<body>
<div></div>
</body>
</html>
$(document).ready(function(){
$('div').addClass('board');
$('.board').click(function(){
$($('<div class="key"></div>').on('click',function(){$(this).fadeOut()})).appendTo('body');
});
});
.key {
height:25px;
width:25px;
border-radius:3px;
background-color:#1F1F1F;
}
.board {
height:250px;
width:500px;
top:10px;
left:10px;
background-color:#8F8F8F;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment