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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.


                <link href='|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("");
  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() {"" + randomQuote + randomAuthor)
  $("#quote").on("click",function() {