Skip to content

Instantly share code, notes, and snippets.

@kirsten
Created January 19, 2017 20:07
Show Gist options
  • Save kirsten/c3ecc340ecdf05447355ea28042c58d5 to your computer and use it in GitHub Desktop.
Save kirsten/c3ecc340ecdf05447355ea28042c58d5 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=c3ecc340ecdf05447355ea28042c58d5
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<input id="number">
<button>Click Me</button>
<p id="answer"></p>
</body>
</html>
{"enabledLibraries":["jquery"]}
$('button').click(function() {
if ($('#number').val() < 5) {
$('#answer').html('Correct! Your number is less than 5.');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment