Skip to content

Instantly share code, notes, and snippets.

@dursk
Created March 22, 2017 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dursk/f81096900f4ae8128b9193f689c5fec0 to your computer and use it in GitHub Desktop.
Save dursk/f81096900f4ae8128b9193f689c5fec0 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=f81096900f4ae8128b9193f689c5fec0
<!DOCTYPE html>
<html>
<head>
<title>This is easy page</title>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="easy.js"></script>
<link rel="stylesheet" type="text/css" href="easy.css">
</head>
<body>
<h1>Enter your full name</h1>
<input id="pass" class="pass" placeholder="">
<button id="submit" class="submit">Submit</button>
<div id="result" class="result"></div>
</body>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</html>
{"enabledLibraries":["jquery"]}
function makeInitials(fullName) {
var split = fullName.split(" ");
var firstName = split[0];
var lastName = split[1];
var initials = firstName[0] + ". " + lastName[0] + ".";
return initials;
}
// Use the makeInitials function to display the intiails
// that you typed in when you click Submit.
body {
text-align: center;
font-family: cursive;
}
.submit {
font-size: 20px;
padding: 20px;
border-radius: 20px;
font-family: cursive;
}
p {
font-size: 18px;
color: purple;
}
.pass{
width: 300px;
height: 40px;
font-size: 18px;
font-family: cursive;
}
.result{
font-size: 30px;
color: blue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment