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.


                <!--<!DOCTYPE html>-->
<html lang="en">
	<title>Random Quotes!</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link href="" rel="stylesheet" type="text/css"/>
 	<link rel="stylesheet" href="">
	<script src=""></script>
	<script src=""></script>
	<script type="text/javascript" src="Quote.js"></script>
	<div id="content" class="container-fluid text-center">




                $(document).ready(function() {
  //widget for twitter button
  window.twttr = (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0],
      t = window.twttr || {};
    if (d.getElementById(id)) return t;
    js = d.createElement(s); = id;
    js.src = "";
    fjs.parentNode.insertBefore(js, fjs);

    t._e = [];
    t.ready = function(f) {

    return t;
  }(document, "script", "twitter-wjs"));
  //Create starting quote as place holder, would like to have a random quote
  //generated in the future. Works for now though.
  var quoteAppend = "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.";
  var authorAppend = 'Albert Einstein';

  //Generates the html, and changes the css attributes. I could have let
  //html and css do all the work but I was having fun messing around with
  $("#content").html("<div class='well well-sm'><div id='quoteDiv'><span id='quote'></span></div>" + "<div id='authorDiv'><span id='author'></span></div>" + "<a href='#'' id='getQuote' class='btn btn-default btn-lg'>Get Quote</a>" + "<div id='tweetBtn'><a id='tweetThis' href='' class='twitter-share-button' data-text='thisText' data-size='large' data-hashtags='Quotes'>Tweet</a></div></well>");
    "background-color": "grey",
    "background-image": "url('')"
    "padding-top": "10em",
    "padding-bottom": "10em"
    "padding-bottom": "2em",
    "padding-top": "1em"
  $("#quoteDiv").css("padding-top", "7em");
    "background-color": "rgba(171, 205, 239, 0.2)",
    "padding-top": "2em"

  //Sets the initial quote and author.
  $("#quote").html('"' + quoteAppend + '"')
      "font-family": "Lobster",
      "font-size": "3em",
      "color": "#ccc"
  $("#author").html('-' + authorAppend).css({
    "font-size": "2em",
    "color": "#ccc"
  $("#tweetThis").attr("data-text", quoteAppend + "-" + authorAppend);

  //The click function that fetches the quote and author and sets them to the
  $("#getQuote").click(function() {

    $.getJSON("", function(result) {
      var arr = $.map(result, function(el) {
        return el
      quoteAppend = arr[0];
      authorAppend = arr[1];
      $("#quote").html('"' + quoteAppend + '"');
      $("#author").html('-' + authorAppend);
      //code for resetting iframe to dynamically change the twitter info
      $('#tweetBtn iframe').remove();
      var tweetBtn = $('<a></a>')
        .attr('href', '')
        .attr('data-size', 'large')
        .attr('data-text', quoteAppend + "-" + authorAppend);