css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Party Bashers!</title>
  <h1 align="center"> 
		<a href="BirthdayIndex.html"><img src="Banner.png" alt=
		"Welcome to Party Bash!"/>
		</a>
		</h1>
  <!--Referring to css style sheet-->
  <link rel="stylesheet" type="text/css" href="cssfile.css" />
</head>
<body>
<!-- heading container-->
  <header id="header">
    <div class="innertube">
      <h1><marquee behavior ="scroll" direction="right">Find That Store!</marquee></h1>
    </div>
  </header>
  <div id="wrapper">
    <main>
      <div id="content">
        <div class="innertube">
          <span class='blink'><h1 align="center">Geographical</h1></span>
		  <br>
		  <!--adding in the form for the state look up-->
		  <form id="townlookup"> <!--max length of 5. Adding townlookup for IDs -->
<center><label>Find Us in Your Town!</label><input type = "text" id = "firstInput" maxlength="5"></center>
                                    <br>
<center><label for="output">Town Result</label><input type = "text" id = "secondInput" maxlength="0"></center> <!--Max length 0 to prevent typing-->
</form>
                                     <br>	
<center><button id = "lib-button" onclick="townresult()">Search Now</button></center><!--state result click button-->
          <p style="center">
		  Find Our Stores Located across state!!
          </p>
        </div>
      </div>
    </main>
	
<nav id="nav">
      <div class="innertube">
	  <h3>Main Page</h3>
        <ul>
          <li><a href="BirthdayIndex.html">Main</a></li>
        </ul>
        <h3>Shopping</h3>
        <ul>
          <li><a href="Shopping.html">E-Commerce</a></li>
        </ul>
        <h3>Gallery</h3>
        <ul>
          <li><a href="Gallery.html">Canvas</a></li>
        </ul>
      </div>
  </div>
</nav>

  <footer id="footer">
    <div class="innertube">
      <p>Footer</p>
    </div>
  </footer>

</body>

</html>
            
          
!
            
              body {
  margin: 0;
  padding: 0;
  font-family: Sans-Serif;
  line-height: 1.5em;
}
.button {
  padding: 15px 25px;
  font-size: 16px;
  text-align: center;
  cursor: grab;
  outline: none;
  color: #fff;
  background-color: #ee1313;
  border: none;
  border-radius: 15px;
  box-shadow: 0 9px #999;
}

.button:hover {
  background-color: #ee8113;
}

.button:active {
  background-color: #ee8113;
  box-shadow: 0 5px #666;
  transform: translateY(4px);
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.blink {
  color: black;

  animation: blink 0.8s infinite;
}

#header {
  background: #bddbd4;
  height: 100px;
}

#header h1 {
  margin: 0;
  padding-top: 15px;
}

main {
  padding-bottom: 10010px;
  margin-bottom: -10000px;
  float: left;
  width: 100%;
}

#nav {
  padding-bottom: 10010px;
  margin-bottom: -10000px;
  float: left;
  width: 230px;
  margin-left: -100%;
  background: #ccbda2;
}

#footer {
  clear: left;
  width: 100%;
  background: #ccc;
  text-align: center;
  padding: 4px 0;
}

#wrapper {
  overflow: hidden;
}

#content {
  margin-left: 230px; /* Same as 'nav' width */
}

.innertube {
  margin: 15px; /* Padding for content */
  margin-top: 0;
}

p {
  color: #555;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

nav ul a {
  color: teal;
  text-decoration: none;
}
.confetti {
  width: 60px;
  height: 60px;
  margin-top: -100px;
  border-radius: 30px;
  position: relative;
  background-color: teal;
  animation: confetti 6s;
  animation-iteration-count: infinite;
}
@keyframes confetti {
  0% {
    top: 0px;
  }
  100% {
    top: 1500px;
  }
}
@keyframes confetti {
  0% {
    top: 0px;
  }
  100% {
    top: 1500px;
  }
}
.confetti1,
.confetti2,
.confetti3,
.confetti4 {
  background-color: #deb887;
}
.confetti1 .confetti12 {
  animation-delay: 1s;
}
.confetti1 {
  margin-left: 100px;
}
.confetti2 {
  margin-left: 300px;
}
.confetti3,
.confetti6,
.confetti20 {
  animation-delay: 1.5s;
}
.confetti3 {
  margin-left: 800px;
}
.confetti4 {
  margin-left: 900px;
  animation-delay: 3s;
}
.confetti5,
.confetti6,
.confetti7 {
  background-color: #66cdaa;
}
.confetti5 {
  margin-left: 700px;
}
.confetti6 {
  margin-left: 200px;
}
.confetti7,
.confetti8 {
  animation-delay: 4.5s;
}
.confetti8,
.confetti9,
.confetti10,
.confetti11 {
  background-color: #c0c0c0;
}
.confetti8 {
  margin-left: 200px;
}
.confetti9 {
  margin-left: 900px;
}
.confetti10,
.confetti14,
.confetti18 {
  animation-delay: 2.5s;
}
.confetti10 {
  margin-left: 550px;
}
.confetti11 {
  margin-left: 350;
  animation-delay: 2s;
}
.confetti12,
.confetti13,
.confetti14 {
  background-color: #2f4f4f;
}
.confetti12 {
  margin-left: 350;
}
.confetti13 {
  margin-left: 620;
  animation-delay: 4s;
}
.confetti14 {
  margin-left: 570;
}
.confetti15,
.confetti16,
.confetti17,
.confetti18 {
  background-color: #000000;
}
.confetti15 {
  margin-left: 650px;
}
.confetti16 {
  margin-left: 100px;
  animation-delay: 4s;
}
.confetti17,
.confetti21 {
  animation-delay: 0.5s;
}
.confetti17 {
  margin-left: 250px;
}
.confetti18 {
  margin-left: 450px;
}
.confetti19,
.confetti20,
.confetti21 {
  background-color: #fffafa;
}
.confetti19 {
  margin-left: 450px;
}
.confetti20 {
  margin-left: 850px;
}
.confetti21 {
  margin-left: 200px;
}

            
          
!
            
              /* Function for purchases */
var ecommerce = [10, 10, 10, 10, 10];

function purchaseFunction(index) {
  if (ecommerce[index] == 0)
    window.alert("Sorry! That item is no longer available");
  else ecommerce[index]--;
  console.log(ecommerce);
}

/*Function for Towns*/
function townresult() {
  /*inputs first displays second*/
  verifyZIP(
    document.getElementById("firstInput").value,
    document.getElementById("secondInput").value
  );
}
function verifyZIP(zipfield, townfield) {
  var valid = "0123456789-";
  var hyphencount = 0;

  /* Prevents incomplete zips*/
  if (zipfield.length != 5) {
    alert("Only 5 digits zips are allowed");
    return false;
  }

  for (var q = 0; q < zipfield.length; q++) {
    temp = "" + zipfield.substring(q, q + 1);
    if (temp == "-") hyphen++;
    if (valid.indexOf(temp) == "-1") {
      alert("The following input is not allowed.Please try again.");
      return false;
    }
  }
  /* addding display for second input */
  document.getElementById("secondInput").value = gettown(zipfield);
}
function gettown(Townnames) {
  Townnames = parseInt(Townnames);
  if (Townnames < 601) {
    return "NY";
  } else if (Statenames > 601 && Statenames <= 795) {
    return "PR";
  }
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console