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.


  <div id="content" class="container-fluid text-center">
    <footer>Created by Jesse989</footer>



                @import "";


                $(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='col-md-6 col-md-offset-3'><div><div id='quote'></div><div class='row'><div class='col-md-offset-6'><div id='author'></div></div></div></div><div><a href='#' id='getQuote' class='btn btn-default btn-lg'>Get Quote</a></div><div><a id='tweetThis' href='' class='twitter-share-button' data-text='thisText' data-size='large' data-hashtags='Quotes'>Tweet</a></div>");
    "background-image": "url('')",
    "font-family": "Inconsolata"
 $("div").css({"padding-top": ".2em", "padding-bottom": ".2em"});
  $("#getQuote").css({"background-color": "rgba(0,0,0,.3)", "color": "#ccc"});
  //Sets the initial quote and author.
  $("#quote").html('"' + quoteAppend + '"')
      "font-size": "2em",
      "color": "#ccc",
    "text-align": "center",
    "margin-top": "4em"
  $("#author").html('-' + authorAppend).css({
    "font-size": "1.5em",
    "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', 'small')
        .attr('data-text', quoteAppend + "-" + authorAppend);