Created
November 30, 2016 05:55
-
-
Save alexpelan/4dce0f6a7b9f1762dddc0d354abd9117 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=4dce0f6a7b9f1762dddc0d354abd9117
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>Page Title</title> | |
| </head> | |
| <body> | |
| <p class="knock"> Knock knock.</p> | |
| <p class="whos"> Who's there? </p> | |
| <input id="adjective"> <button class="js-first">Enter your name</button> | |
| <p class="next"> who?</p> | |
| <input id="punchline"> <button class="js-second">Finish the joke!</button> | |
| <p class="punchline"></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
| $(".js-first").click(function() { | |
| $(".next").prepend($("#adjective").val()); | |
| }); | |
| $(".js-second").click(function() { | |
| $(".punchline").append($("#punchline").val()); | |
| }); |
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
| .knock { | |
| color: red; | |
| font-size: 24px; | |
| } | |
| .whos { | |
| color: blue; | |
| font-size: 24px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment