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

Packages

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.

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.

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.

HTML

              
                <div class="jumbotron" id="banner">
  <h1 class="text-center">Random Quote Machine</h1>
</div>

<div class="container">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <div class="jumbotron" id="main_block">
        <p class="panel panel-body" id="mblock"></p>
      </div>
      <div class="row">
        <div class="col-md-12 col-md-offset-4">
          <button id="get_quote" class="btn btn-warning">Get New Quote</button>
        <i id="tweet" class="btn btn-primary fa fa-twitter" aria-hidden="true"></i>

        </div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body{
  background-color:#d4d5d6 ;}
#banner{
  background-color:#d4d5d6;
  color:;
}
#main_block{
  background-color:;
}

              
            
!

JS

              
                var x = [
 { "title" : "Milton Glaser",
  
  "quote" : `I go to work every morning with the possibility that I might learn something I don\u2019t already know&#8230; You should look at every problem and think, \u2018what can I learn by doing this?\u2019 And if you think you can learn nothing, forget about doing it.`},
  
 { "title" : "Ernest Hemingway",
  "quote" : `Write drunk; edit sober.`},
  
 { "title" : "Joshua Blankenship",
  
  "quote" : `But the web will still be full of arrogant, uninformed, polarizing, self-promoting, controversy-creating content that has ramifications no one wants to own up to. And consequently, the web will still be lacking in common courtesy, humility, and the admittance that most of us don&#8217;t know best. Which is sad, mostly because it&#8217;s true.`},
  
  {"title" : "Jonathan Ive",
   "quote" : `The word design is everything and nothing. The design and the product itself are inseparable.`
  },
  
  {"title" : "Ed Frank",
  "quote" : `I think there are two types of people in this world &#8211; people who can start things and people who can finish things. And while I place great value on the finishers, it&#8217;s the starters who are rare because they can envision what isn&#8217;t there.`},
  
  {
  "title" : "Matthew Haeck",
  "quote" : `Sometimes the best way to prove your own value is to let a client play the field.` 
  },
  
  {
  "title" : "Thomas Edison" ,
  "quote" : `Opportunity is missed by people because it is dressed in overalls and looks like work.`
  },
  
  {
  "title" : "Paul Rand" ,
  "quote" : `Art is an idea that has found its perfect visual expression. And design is the vehicle by which this expression is made possible. Art is a noun, and design is a noun and also a verb. Art is a product and design is a process. Design is the foundation of all the arts.`  
  },
 
  {
  "title" : "Henry Dreyfuss" ,
  "quote" : `[If] people are made safer, more comfortable, more eager to purchase, more efficient, or just happier, the designer has succeeded.`  
  },
  
  {
  "title" : "Jay Bradner" ,
  "quote" : `Stop downloading. Start uploading.`  
  }
];

$("#get_quote").on("click",function(){
    var y = Math.floor(Math.random()*10);
    $("#mblock").html(x[y].quote+"<h4>-"+x[y].title+"</h4>");
    $("#tweet").html(`<a href="https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=`+x[y].quote+x[y].title+`" ></a>`);

    
    /*updateDiv();
    $.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
    $("#mblock").html(a[0].content + "<p>— " + a[0].title + "</p>"*/
      
   });


//<a href="" ><i class="btn btn-primary fa fa-twitter" aria-hidden="true"></i></a>
              
            
!
999px

Console