Skip to content

Instantly share code, notes, and snippets.

@alexpelan
Created March 21, 2017 03:22
Show Gist options
  • Select an option

  • Save alexpelan/289ccdae41efc01d48347fdcc3cbec51 to your computer and use it in GitHub Desktop.

Select an option

Save alexpelan/289ccdae41efc01d48347fdcc3cbec51 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=289ccdae41efc01d48347fdcc3cbec51
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>Name one of the ScriptEd volunteers!</p> <input>
<button>Click!</button>
</body>
</html>
{"enabledLibraries":["jquery"]}
$("button").click(function() {
var name = $("input").val();
if (name === "Jesse" || name === "Alex" && name === "Mat" && name === "Meghan") {
$("body").append("That's correct!");
} else {
$("body").append("That's incorrect!");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment