Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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

            
              <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js" integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ" crossorigin="anonymous"></script>

<div class="container container-fluid">
  <div class="quote-box jumbotron"> 
    <div class="row">
        <div class="quote-text jumbotron col-12">
          <sup><i class="fa fa-quote-left fa-2x"></i></sup><p style="display: inline">Click The Button To Generate A New Quote</p>
          <p id="quote-genius"></p>
        </div>
      <div class="w-100"></div>
      <div class="col-md">
        <a class="tweet" title="Tweet this quote!" target="_blank"><i class="fab fa-twitter fa-2x"></i></a>
      </div>
      <div class="col-md new-button" id="new-button">
      <button type="button" class="">
        New Quote
      </button>
      </div>
    </div>
  </div>
</div>


            
          
!

CSS

            
              body {
  background-color:  #EFEEEB;
}
.new-button {
  padding-left: 750px;
  padding-bottom: ;
}
.tweet {
  padding-left: 50px;
  padding-top: ;
}
.buttons {
  padding-top: ;
}
.quote-box {
  background-color: #3DBDF1;
}
.container {
  padding-top: 150px;
}
.quote-text {
  padding-top: 50px; 
}
.btn {
  background-color: #111234;
}
#quote-genius {
  padding-top: 20px;
  padding-left: 80%;
}
button {
  background-color: #77f2fe;
  border: none;
  color: white;
  text-decoration: none;
  display: inline-block;
  padding: 14px 30px;
  text-align: center;
  font-size: 16px;
  border-radius: 4px
}
button:hover {
  background-color: #5dade2;
}
            
          
!

JS

            
              $(document).ready(function() {
  var quoteSource = [
    {
      quote:
        "Start by doing what's necessary; then do what's possible; and suddenly you are doing the impossible.",
      name: "Francis of Assisi"
    },
    {
      quote: "Believe you can and you're halfway there.",
      name: "Theodore Roosevelt"
    },
    {
      quote: "It does not matter how slowly you go as long as you do not stop.",
      name: "Confucius"
    },
    {
      quote:
        "Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.",
      name: "Thomas A. Edison"
    },
    {
      quote:
        "The will to win, the desire to succeed, the urge to reach your full potential... these are the keys that will unlock the door to personal excellence.",
      name: "Confucius"
    },
    {
      quote: "Don't watch the clock; do what it does. Keep going.",
      name: "Sam Levenson"
    },
    {
      quote:
        "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
      name: "Ayn Rand"
    },
    {
      quote:
        "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
      name: "Ayn Rand"
    },
    {
      quote: "Expect problems and eat them for breakfast.",
      name: "Alfred A. Montapert"
    },
    {
      quote: "Start where you are. Use what you have. Do what you can.",
      name: "Arthur Ashe"
    },
    {
      quote:
        "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.",
      name: "Samuel Beckett"
    },
    {
      quote: "Be yourself; everyone else is already taken.",
      name: "Oscar Wilde"
    },
    {
      quote:
        "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.",
      name: "Albert Einstein"
    },
    {
      quote:
        "Always remember that you are absolutely unique. Just like everyone else.",
      name: "Margaret Mead"
    },
    {
      quote:
        "Do not take life too seriously. You will never get out of it alive.",
      name: "Elbert Hubbard"
    },
    {
      quote:
        "People who think they know everything are a great annoyance to those of us who do.",
      name: "Isaac Asimov"
    },
    {
      quote: "Procrastination is the art of keeping up with yesterday.",
      name: "Don Marquis"
    },
    {
      quote: "Get your facts first, then you can distort them as you please.",
      name: "Mark Twain"
    },
    {
      quote: "A day without sunshine is like, you know, night.",
      name: "Steve Martin"
    },
    {
      quote:
        "My grandmother started walking five miles a day when she was sixty. She's ninety-seven now, and we don't know where the hell she is.",
      name: "Ellen DeGeneres"
    },
    {
      quote: "Don't sweat the petty things and don't pet the sweaty things.",
      name: "George Carlin"
    },
    {
      quote: "Always do whatever's next.",
      name: "George Carlin"
    },
    {
      quote: "Atheism is a non-prophet organization.",
      name: "George Carlin"
    },
    {
      quote:
        "Hapiness is not something ready made. It comes from your own actions.",
      name: "Dalai Lama"
    }
  ];
 
    
    
   $("#new-button").on("click", function(evt) { 
     var quote = $(".quote-text P").text();
     evt.preventDefault();
     console.log(quote);
  var randomQuote = Math.floor(Math.random() * quoteSource.length);
      var newQuote = quoteSource[randomQuote].quote;
     var newGenius = quoteSource[randomQuote].name;
     $(".quote-text").fadeOut(500, function(){   
     $(".quote-text").html(" ");
       $(".quote-text").html("<sup>"+"<i class='fa fa-quote-left fa-2x'>"+"</i>"+"</sup>");
        $(".quote-text").append("<p style='display: inline'>" + newQuote + "</p>" + "<p id='quote-genius'>" + "-								" + newGenius + "</p>");
       $(".quote-text").fadeIn(500);
     });                               
             $('.tweet').attr('href', 'https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=' + encodeURIComponent('"' + newQuote + '" ' + newGenius));
  });
});

            
          
!
999px

Console