Skip to content

Instantly share code, notes, and snippets.

@anaguzmn
Created November 28, 2016 22:09
Show Gist options
  • Save anaguzmn/f3056fb75738e7e89d5efc844ba9b0c4 to your computer and use it in GitHub Desktop.
Save anaguzmn/f3056fb75738e7e89d5efc844ba9b0c4 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=f3056fb75738e7e89d5efc844ba9b0c4
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1> What is your name? </h1>
<button id = "magic">Say Hello</button>
<input type="text" name="textie">
<input type="text" name="textie">
<button id = "appear">Favorite food</button>
</body>
</html>
{"enabledLibraries":["jquery"]}
$("#magic").click(function(){
$("body").append("<p> Hi "+ $("input").val()+" </p>");
});
$("#appear").click(function(){
$("body").append("<p> My favorite food is "+ $("input").val()+" </p>");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment