Skip to content

Instantly share code, notes, and snippets.

@outoftime
Created April 14, 2017 00:58
Show Gist options
  • Select an option

  • Save outoftime/f8d0c7f4128fb6f184b15966b48e05f6 to your computer and use it in GitHub Desktop.

Select an option

Save outoftime/f8d0c7f4128fb6f184b15966b48e05f6 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=f8d0c7f4128fb6f184b15966b48e05f6
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h2>Rock-Paper-Scissors</h2>
<img id="rock" src="http://3.bp.blogspot.com/-KHc70esXncY/T76RN0I7mKI/AAAAAAAAOwg/8xUnLhIcHGU/s1600/key%2Bholder.jpg">
<img id="paper" src="http://www.clipartkid.com/images/140/college-ruled-piece-of-paper-with-binder-ring-holes-jpg-binder-paper-tjAYKV-clipart.jpg">
<img id="scissors" src="http://www2.fiskars.com/var/fiskars_amer/storage/images/frontpage2/products/crafting-and-sewing/scissors-and-shears/non-stick-detail-scissors-no.-5/14334-16-eng-US/Non-stick-Detail-Scissors-No.-5.jpg">
</body>
</html>
{"enabledLibraries":["jquery"]}
// The game doesn’t work!
// Your goal is to make it so that playing ROCK works correctly.
// Fix the click handler below so that it works like this:
// When someone clicks the element with id “rock”,
// hide the element with id “scissors”
$("FIXME").click(function() {
$("FIXME").hide();
});
h2 {
text-align: center;
}
img {
max-width: 35vw;
max-height: 35vh;
cursor: pointer;
margin: 5vh 5vw;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment