Created
November 22, 2016 20:22
-
-
Save courtney-scripted/d5341355f19a99bbbb9439a9c7b843b5 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=d5341355f19a99bbbb9439a9c7b843b5
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>Hello</title> | |
</head> | |
<body> | |
<h1>What is your name?</h1> | |
<input id="name"> | |
<button id="say-hello">Say hello</button> | |
<h2 id="result">Hello!</h2> | |
</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
$("#say-hello").click(function() { | |
$('#result').text("Hello, " + | |
$("#name").val()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment