Created
December 7, 2016 21:04
-
-
Save anaguzmn/982c9108d25fe1e38cad3095a847db26 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=982c9108d25fe1e38cad3095a847db26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"enabledLibraries":["jquery"]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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