Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 124 lines (69 sloc) 3.08 KB
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link href="https://fonts.googleapis.com/css?family=Just+Another+Hand|Raleway|Roboto+Condensed" rel="stylesheet">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- Add your site or application content here -->
<div id=background>
<div id=container>
<h2> Fall Mad Libs </h2>
<p> Enter the fields below to make your own fall mad lib! </p>
<input type="text" id="namefirst" placeholder="your name">
<input type="text" id="nounOne" placeholder="noun">
<input type="text" id="adjOne" placeholder="adjective">
<input type="text" id="nounTwo" placeholder="noun, plural">
<input type="text" name="entryC" id="adjTwo" placeholder="adjective">
<button id="launch">Go!</button>
<hr>
<div id="story"></div>
</div>
</div>
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
<script>
var fname = document.querySelector("#namefirst");
var entryOne = document.querySelector("#nounOne");
var entryA = document.querySelector("#adjOne");
var entryB = document.querySelector("#nounTwo");
var entryC = document.querySelector("#adjTwo");
var story = document.querySelector("#story")
var launch = document.querySelector("#launch");
launch.addEventListener("click", writeStory, false);
function writeStory(){
if (fname.value=="" ||entryOne.value=="" || entryA.value == "" || entryB.value == "" || entryC.value == "") {
alert("Please make sure all forms are completed.")
return false;
}
var launchedStory = "";
launchedStory += fname.value + "'s favorite part about fall is that the " + entryOne.value + " gets ";
launchedStory += entryA.value + ", and the ";
launchedStory += entryB.value + " become ";
launchedStory += entryC.value + ".";
story.innerHTML = launchedStory;
}
</script>
</body>
</html>