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.

              <link href='https://fonts.googleapis.com/css?family=Playball|Lato' rel='stylesheet' type='text/css'>
<div class="container-fluid text-center">
    <h1>Random Quote Generator</h1>
  <div class="well well-lg">
    <div class="quotes">
      <span class="phrase">Why does the eye see a thing more clearly in dreams than the imagination when awake?</span>
      <span class="author">--Leonardo da Vinci</span>
      <button class="btn btn-default text-left" id="quote" type="submit">New Quote</button>
      <a href="#" class="fa-stack fa-lg twShare" id="tweet" rel="nofollow" ><i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i></a> 
              body {
  background-image: url("http://i53.photobucket.com/albums/g41/thechrissyalbert/blue_snow_background_zpsttybar46.jpg");
  color: #FAF2D8;
  font-family: 'Lato', sans-serif;
h1 {
  color: #ADA073;
.well {
  background-color: #858BAD;
  width: 33%;
  margin-right: auto;
  margin-left: auto;
  height: auto;
  margin-top: 60px;
.phrase {
  font-family: 'Playball', cursive;
  font-size: 40px;
.author {
  font-style: italic;
.btn {
  color: #ADA073;
  background-color: #F6F7FF;
.twShare {
  padding: 25px;

              $(document).ready(function () {
  var randomQuote;
  var randomAuthor;
  function getQuote(){
    var quotes = ["Life is really simple, but we insist on making it complicated.", "Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.", "Life is ten percent what happens to you and ninety percent how you respond to it.", "The purpose of our lives is to be happy.", "The best way to find yourself is to lose yourself in the service of others.", "Start by doing what's necessary; then do what's possible; and suddenly you are doing the impossible.", "When someone shows you who they are, believe them the first time.", "The secret of getting ahead is getting started.", "Cowards die many times before their deaths; the valiant never taste of death but once.","If you love someone, set them free. If they come back they're yours; if they don't they never were.", "To live in this world, you must be able to do three things: to love what is mortal; to hold it against your bones knowing your own life depends on it; and, when the time comes to let it go, to let it go.", "In the end, it's not the years in your life that count. It's the life in your years."]
    var authors = ["Confucious", "Buddha", "Lou Holtz", "Dalai Lama", "Mahatma Gandi","Francis of Assisi", "Maya Angelou", "Mark Twain", "William Shakespeare", "Richard Bach", "Mary Oliver", "Abraham Lincoln"]
    var randomNum = Math.floor(Math.random()*quotes.length);
    randomQuote = quotes[randomNum];
    randomAuthor = "-- " + authors[randomNum];
  $('#tweet').on("click", function() {
      window.open("https://twitter.com/intent/tweet?text=" + randomQuote + randomAuthor)
  $("#quote").on("click",function() {

🕑 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.