css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

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.

              <link href='https://fonts.googleapis.com/css?family=Patrick+Hand+SC' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Eagle+Lake:400' rel='stylesheet' type='text/css'>
<div class='container' style='margin-top:100px;'>
  <div class='row'>
    <div class='col-md-1'></div>
    <div class='col-md-10 text-center'>
      <blockquote><p id='show'>Everything is theoretically impossible, until it is done. -Robert A. Heinlein</p></blockquote>
    <div class='col-md-1'></div>
  <div class='row'>
      <div class='col-md-12'><center>
        <div href='#' id='getQ' class='myButton btn btn-default'>Get Quote</div>
  <div class='row' style='margin-top:10px;'>
      <div class='col-md-12'>
        <center><div id='tweet' class='myButton btn btn-default'>Try your luck! </div></center>

              #show {
  box-shadow:0px 20px 30px black;
  font-family: 'Patrick Hand SC', cursive;

body {

.myButton {
  border-radius:30px 0 30px;
  box-shadow:0px 10px 25px grey;
  font-family: 'Eagle Lake', cursive;

              //Generating a random number with give range
function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;

//Getting the quote from an array
function getQuote(){
  var show = "";
  var q = ["Beneath every cynic there's a frustrated romantic. -Peter Bishop",
          "Maybe some Valium would help. -Walter Bishop",
          "If the facts don't fit the theory, change the facts. -A.Einstein",
          "Science is organized knowledge. -H.Spencer",
          "Science without religion is lame, religion without science is blind. -A.Einstein",
          "If we knew what it was, we wouldn't call it research -A.Einstein",
           "Somewhere, something incredible is waiting to be known. -Carl Sagan",
          "Time is a drug. Too much of it kills you. -Terry Pratchett",
          "Everything must be made as simple as possible. But not simpler. -A.Einstein",
          "If I have seen further it is by standing on the shoulders of Giants. -Isaac Newton",
          "Tto make an apple pie from scratch, you must first invent the universe. -Carl Sagan", 
           "Science flies you to the moon. Religion flies you into buildings. -Victor Stenger", 
           "I don't want to believe. I want to know. -Carl Sagan",
           "To invent, you need a good imagination and a pile of junk. -T.Edison",
           "Millions saw the apple fall, Newton was the only one who asked why?-Bernard Baruch"];
  show += q[getRandomInt(0,q.length-1)];
  return show;

function jumpToUrl(url){
  window.open(url, 'Share', 'width=440, height=350, toolbar=0, scrollbars=1 ,location=0 ,statusbar=0,menubar=0, resizable=0');

//Events & jQuery
    var quote = getQuote();
  $("#tweet").on("click", function(){
    var quote = getQuote();
    var url = 'https://twitter.com/intent/tweet?hashtags=BishopQuotesCollection&text=';
    url += quote;



🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................