Skip to content

Instantly share code, notes, and snippets.

@anaguzmn
Created December 7, 2016 21:04
Show Gist options
  • Save anaguzmn/982c9108d25fe1e38cad3095a847db26 to your computer and use it in GitHub Desktop.
Save anaguzmn/982c9108d25fe1e38cad3095a847db26 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=982c9108d25fe1e38cad3095a847db26
<!DOCTYPE html>
<html>
<head>
<title>ScriptEd Love</title>
</head>
<body>
<h1>Do you love Scripted?</h1>
<button id="yes">Yes</button>
<button id="no">No</button>
<p id=answer><p>
</body>
</html>
{"enabledLibraries":["jquery"]}
// When the Yes button is clicked, display "I Knew it!" below
// Add your code here
//
// Extra credit: What is going on here?
$("#no").hover(function() {
$("#no").animate({
top: "400px"
});
$("#no").animate({
top: "0"
});
});
$("#yes").click(function(){
$("#answer").html("I knew it");
});
button {
position: relative;
}
#answer{
font-size: 80px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment