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.

            
              <html>
  
<style>
</style>
  
<head>
</head>

<body>
  <link href='http://fonts.googleapis.com/css?family=Berkshire+Swash' rel='stylesheet' type='text/css'>
 <div>
    <br>
    <br>
    <h1 class="floralwhite-text">Quote Randomizer.</h1>
 </div>
  
 <div>
    <h2 class="center thick"> Here's the thing about quotes. There are those that hate them. There are those that love them. There are also those who wear them on their person as a badge of honor as if hawking words from some long-dead poet adds to their own personal flair. This generator is for all of you. Use it to annoy your friends, to decorate your journal, to guide your life or to permanently etch onto your skin. We can't guarantee you'll always like what the randomizer comes up with, but words matter. The written word is one of the first and last bastions of human creation. This is a basic collection of such words.</h2>
   <br>
   <br>
</div>
  
<div><center>
<br>
  <button class="btn btn-default thick" id="getquote">Click Here To Generate A Quote Below!</button>
<br>
</div>
  
<div>
<br>
<br>
  <p class="center thick" id="quotebox">A wild quote should appear here once you click the button!</p>
<br>
<br>
<br>
</center>
</div>
  
</body>
  
</html>
            
          
!
            
              
body {
  background:url('https://s26.postimg.org/eh4nvdnbt/52676-digital_art-simple_background-748x421.png');
   -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

  .floralwhite-text{
    color: FloralWhite;
  }

  .black-text {
    color: black;
}

h1 {
    text-align: center;
}

 h1 {
  font: 400 100px/1.3 'Berkshire Swash', Helvetica, sans-serif;
  color: #2b2b2b;
  text-shadow: 1px 1px 0px #ededed, 4px 4px 0px rgba(0,0,0,0.15);
  }

h2 {
    border: 15px solid Silver;
    padding: 25px;
    margin: 25px;
    height: auto;
    width: 600px;
    text-align: center;
    background-color: FloralWhite;
}


p {
    border: 15px solid Silver;
    padding: 25px;
    margin: 25px;
    height: auto;
    width: auto;
    text-align: center;
    background-color: FloralWhite;
}

h2 {
	font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
	font-size: 24px;
	font-style: normal;
	font-variant: normal;
	font-weight: 500;
	line-height: 26.4px;
}

button {
  background-color: Silver;
  border-radius: 10px;
  font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
	font-size: 24px;
	font-style: normal;
	font-variant: normal;
	font-weight: 500;
	line-height: 26.4px;
  height: 130px;
  width: 160px;
}

p {
	font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
	font-size: 24px;
	font-style: normal;
	font-variant: normal;
	font-weight: 500;
	line-height: 26.4px;
}

.center {
    margin: auto;
    width: 50%;
}

.thick {
    font-weight: bold;
}


            
          
!
            
              function getRandomQuote() {
// impl me
  return quoteSource[Math.floor(Math.random() * quoteSource.length)]
}

$(document).ready(function(){
  $("#getquote").click(function() {
    var quote = getRandomQuote();
    
    console.log(quote);
    
    $("#quotebox").html(quote.quote);
  });
});
              
var quoteSource=[ 
  {
  quote: "You only live once, but if you do it right, once is enough. - Mae West"
  },
  
  { 
  quote: "A room without books is like a body without a soul. - Marcus Tullius Cicero"
  },
  
  {
  quote: "No one can make you feel inferior without your consent. - Eleanor Roosevelt"
  },
  
  {
    quote:  "Mother is the name for god on the lips and hearts of all children. - Eric Draven, The Crow"
  },
  
   {
  quote: "I am so clever that sometimes I don't understand a single word of what I am saying. - Oscar Wilde"
  },
  
  {
  quote: "It should be possible to explain the laws of physics to a barmaid. - Albert Einstein"
  },
  
  {
  quote: "Always forgive your enemies; nothing annoys them so much. - Oscar Wilde"
  },
  
  {
  quote: "Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi"
  },
  
  {
  quote: "We accept the love we think we deserve. - Stephen Chbosky"
  },
  
  {
  quote: "I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison"
  },
  
  {
  quote: "I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living. - Dr. Seuss"
  },
  
  {
  quote: "The question isn't who is going to let me; it's who is going to stop me. - Ayn Rand"
  },
  
  {
  quote: "We can evade reality, but we cannot evade the consequences of evading reality - Ayn Rand"
  },
  
  {
  quote: "A creative man is motivated by the desire to achieve, not by the desire to beat others. - Ayn Rand"
  },
  
  {
  quote: "Money is only a tool. It will take you wherever you wish, but it will not replace you as the driver. - Ayn Rand"
  },
  
  {
  quote: "I have no special talents. I am only passionately curious. - Albert Einstein"
  },
  
  {
  quote: "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. - Albert Einstein"
  },
  
  {
  quote: "It is never too late to be what you might have been. - George Eliot"
  },
  
  {
  quote: "The only way out of the labyrinth of suffering is to forgive. - John Green"
  },
  
  {
  quote: "It takes courage to grow up and become who you really are. - E.E. Cummings"
  },
  
  {
  quote: "The world is not a wish-granting factory. - John Green"
  },
  
  {
  quote: "Perhaps one did not want to be loved so much as to be understood. - George Orwell"
  },
  
  {
  quote: "All we have to decide is what to do with the time that is given us. - J.R. R. Tolkien"
  }
  
  ];
            
          
!
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